[llvm-commits] [llvm-gcc-4.2] r43913 [66/80] - in /llvm-gcc-4.2/trunk: boehm-gc/ boehm-gc/Mac_files/ boehm-gc/cord/ boehm-gc/doc/ boehm-gc/include/ boehm-gc/include/private/ boehm-gc/tests/ libffi/ libffi/include/ libffi/src/ libffi/src/alpha/ libffi/src/arm/ libffi/src/cris/ libffi/src/frv/ libffi/src/ia64/ libffi/src/m32r/ libffi/src/m68k/ libffi/src/mips/ libffi/src/pa/ libffi/src/powerpc/ libffi/src/s390/ libffi/src/sh/ libffi/src/sh64/ libffi/src/sparc/ libffi/src/x86/ libffi/testsuite/ libffi/testsuite/config/ li...

Bill Wendling isanbard at gmail.com
Thu Nov 8 14:57:11 PST 2007


Added: llvm-gcc-4.2/trunk/libjava/configure
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/configure?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/configure (added)
+++ llvm-gcc-4.2/trunk/libjava/configure Thu Nov  8 16:56:19 2007
@@ -0,0 +1,18892 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for libjava version-unused.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='libjava'
+PACKAGE_TARNAME='libjava'
+PACKAGE_VERSION='version-unused'
+PACKAGE_STRING='libjava version-unused'
+PACKAGE_BUGREPORT=''
+
+ac_unique_file="java/lang/System.java"
+ac_subdirs_all="$ac_subdirs_all classpath libltdl"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_libsubdir build_subdir host_subdir target_subdir multi_basedir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am_!
 _fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB JAR ZIP UNZIP BASH_JAR_TRUE BASH_JAR_FALSE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS LIBGCJ_LD_SYMBOLIC LIBGCJDEBUG TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE GCJH INCLTDL LIBLTDL DIRLTDL LIBTOOL CXXCPP CPPFLAGS GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs TESTSUBDIR_TRUE TESTSUBDIR_FALSE JAVA_HOME_SET_TRUE JAVA_HOME_SET_FALSE JAVA_HOME INTERPRETER LIBFFI LIBFFIINCS PLATFORM_INNER_NAT_HDRS CPP EGREP USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC LIBGCJTESTSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS extra_ldflags_libjava GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS !
 THREADSPEC THREADSTARTFILESPEC THREADLDFLAGS THREADCXXFLAGS US!
 ING_POSI
X_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE USE_LIBGCJ_BC_TRUE USE_LIBGCJ_BC_FALSE LIBGCJ_SPEC HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE LIBICONV LTLIBICONV PKG_CONFIG GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS CLASSPATH_SEPARATOR ac_ct_GCJ ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC BACKTRACESPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir dbexecdir GCJVERSION gxx_include_dir libstdcxx_incdir ALLOCA PERL SYSDEP_SOURCES LD_START_STATIC_SPEC LD_FINISH_STATIC_SPEC here LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+	      localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CXXCPP_set=${CXXCPP+set}
+ac_env_CXXCPP_value=$CXXCPP
+ac_cv_env_CXXCPP_set=${CXXCPP+set}
+ac_cv_env_CXXCPP_value=$CXXCPP
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures libjava version-unused to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+X features:
+  --x-includes=DIR    X include files are in DIR
+  --x-libraries=DIR   X library files are in DIR
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of libjava version-unused:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-multilib       build many library versions (default)
+  --enable-version-specific-runtime-libs
+                          specify that runtime libraries should be installed
+                          in a compiler-specific directory
+  --enable-plugin         build gcjwebplugin web browser plugin
+  --enable-gconf-peer     compile GConf native peers for util.preferences
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-maintainer-mode  enable make rules and dependencies not useful
+			  (and sometimes confusing) to the casual installer
+  --enable-libgcj-debug   enable runtime debugging code
+  --enable-java-awt       list of AWT peer implementations to be built
+  --enable-shared=PKGS  build shared libraries default=yes
+  --enable-static=PKGS  build static libraries default=yes
+  --enable-fast-install=PKGS  optimize for fast installation default=yes
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+  --disable-getenv-properties
+                          don't set system properties from GCJ_PROPERTIES
+  --enable-hash-synchronization
+                          use global hash table for monitor locks
+  --enable-gc-debug       include full support for pointer backtracing etc.
+  --enable-interpreter    enable interpreter
+  --enable-sjlj-exceptions
+                          force use of builtin_setjmp for exceptions
+  --disable-java-net      disable java.net
+  --disable-jvmpi         disable JVMPI support
+  --enable-java-gc=TYPE   choose garbage collector (default is boehm)
+  --disable-rpath         do not hardcode runtime library paths
+  --enable-tls            Use thread-local storage [default=yes]
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-build-libsubdir=DIR  Directory where to find libraries for build system
+  --with-target-subdir=SUBDIR
+                          configure in a subdirectory
+  --with-cross-host=HOST  configure with a cross compiler from HOST
+  --with-newlib           configure with newlib
+  --with-gnu-ld           assume the C compiler uses GNU ld default=no
+  --with-pic              try to use only PIC/non-PIC objects default=use both
+  --with-java-home=DIRECTORY
+                          value of java.home system property
+  --with-win32-nlsapi=ansi or unicows or unicode
+                          native MinGW libgcj Win32 OS API (default is ansi)
+  --without-libffi        don't use libffi
+  --with-ecos             enable runtime eCos target support
+  --with-system-zlib      use installed libz
+  --with-x                use the X Window System
+  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
+  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  CXXCPP      C++ preprocessor
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+	   test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+libjava configure version-unused
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by libjava $as_me version-unused, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=$`echo $ac_var`
+	echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+ case ${build_alias} in
+  "") build_noncanonical=${build} ;;
+  *) build_noncanonical=${build_alias} ;;
+esac
+
+ case ${host_alias} in
+  "") host_noncanonical=${build_noncanonical} ;;
+  *) host_noncanonical=${host_alias} ;;
+esac
+
+ case ${target_alias} in
+  "") target_noncanonical=${host_noncanonical} ;;
+  *) target_noncanonical=${target_alias} ;;
+esac
+
+
+# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
+# have matching libraries, they should use host libraries: Makefile.tpl
+# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
+# However, they still use the build modules, because the corresponding
+# host modules (e.g. bison) are only built for the host when bootstrap
+# finishes. So:
+# - build_subdir is where we find build modules, and never changes.
+# - build_libsubdir is where we find build libraries, and can be overridden.
+
+# Prefix 'build-' so this never conflicts with target_subdir.
+build_subdir="build-${build_noncanonical}"
+
+# Check whether --with-build-libsubdir or --without-build-libsubdir was given.
+if test "${with_build_libsubdir+set}" = set; then
+  withval="$with_build_libsubdir"
+  build_libsubdir="$withval"
+else
+  build_libsubdir="$build_subdir"
+fi;
+# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
+if ( test $srcdir = . && test -d gcc ) \
+   || test -d $srcdir/../host-${host_noncanonical}; then
+  host_subdir="host-${host_noncanonical}"
+else
+  host_subdir=.
+fi
+# No prefix.
+target_subdir=${target_noncanonical}
+
+
+# We use these options to decide which functions to include.
+
+# Check whether --with-target-subdir or --without-target-subdir was given.
+if test "${with_target_subdir+set}" = set; then
+  withval="$with_target_subdir"
+
+fi;
+
+# We may get other options which we don't document:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
+
+# Find the rest of the source tree framework.
+# Default to --enable-multilib
+# Check whether --enable-multilib or --disable-multilib was given.
+if test "${enable_multilib+set}" = set; then
+  enableval="$enable_multilib"
+  case "$enableval" in
+  yes) multilib=yes ;;
+  no)  multilib=no ;;
+  *)   { { echo "$as_me:$LINENO: error: bad value $enableval for multilib option" >&5
+echo "$as_me: error: bad value $enableval for multilib option" >&2;}
+   { (exit 1); exit 1; }; } ;;
+ esac
+else
+  multilib=yes
+fi;
+
+# We may get other options which we leave undocumented:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
+# See config-ml.in if you want the gory details.
+
+if test "$srcdir" = "."; then
+  if test "$with_target_subdir" != "."; then
+    multi_basedir="$srcdir/$with_multisrctop../.."
+  else
+    multi_basedir="$srcdir/$with_multisrctop.."
+  fi
+else
+  multi_basedir="$srcdir/.."
+fi
+
+
+# Even if the default multilib is not a cross compilation,
+# it may be that some of the other multilibs are.
+if test $cross_compiling = no && test $multilib = yes \
+   && test "x${with_multisubdir}" != x ; then
+   cross_compiling=maybe
+fi
+
+          ac_config_commands="$ac_config_commands default-1"
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+  ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+ case ${build_alias} in
+  "") build_noncanonical=${build} ;;
+  *) build_noncanonical=${build_alias} ;;
+esac
+
+ case ${target_alias} in
+  "") target_noncanonical=${host_noncanonical} ;;
+  *) target_noncanonical=${target_alias} ;;
+esac
+
+
+
+
+# This works around the fact that libtool configuration may change LD
+# for this particular configuration, but some shells, instead of
+# keeping the changes in LD private, export them just because LD is
+# exported.
+ORIGINAL_LD_FOR_MULTILIBS=$LD
+
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+
+# This works around an automake problem.
+mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"
+
+
+
+# Check whether --with-cross-host or --without-cross-host was given.
+if test "${with_cross_host+set}" = set; then
+  withval="$with_cross_host"
+
+fi;
+
+
+# Check whether --with-newlib or --without-newlib was given.
+if test "${with_newlib+set}" = set; then
+  withval="$with_newlib"
+
+fi;
+
+# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
+if test "${enable_version_specific_runtime_libs+set}" = set; then
+  enableval="$enable_version_specific_runtime_libs"
+  case "$enableval" in
+      yes) version_specific_libs=yes ;;
+      no)  version_specific_libs=no ;;
+      *)   { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable version-specific libs" >&5
+echo "$as_me: error: Unknown argument to enable/disable version-specific libs" >&2;}
+   { (exit 1); exit 1; }; };;
+     esac
+else
+  version_specific_libs=no
+
+fi;
+
+# Check whether --enable-plugin or --disable-plugin was given.
+if test "${enable_plugin+set}" = set; then
+  enableval="$enable_plugin"
+  case "$enableval" in
+      yes) plugin_enabled=yes ;;
+      no)  plugin_enabled=no ;;
+      *)   { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable plugin" >&5
+echo "$as_me: error: Unknown argument to enable/disable plugin" >&2;}
+   { (exit 1); exit 1; }; };;
+     esac
+else
+  plugin_enabled=no
+
+fi;
+
+# Check whether --enable-gconf-peer or --disable-gconf-peer was given.
+if test "${enable_gconf_peer+set}" = set; then
+  enableval="$enable_gconf_peer"
+  case "$enableval" in
+      yes) gconf_enabled=yes ;;
+      no)  gconf_enabled=no ;;
+      *)   { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable gconf-peer" >&5
+echo "$as_me: error: Unknown argument to enable/disable gconf-peer" >&2;}
+   { (exit 1); exit 1; }; };;
+     esac
+else
+  gconf_enabled=no
+
+fi;
+
+# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
+
+
+# (1) We use an abnormal CXX (without library references), so we
+# must cache it under a different name.
+# (2) CC, CFLAGS, CXX, CXXFLAGS, LDFLAGS must not be 'precious', or
+# the non-multilib-adjusted value will be used in multilibs.
+# (3) As a side effect, we must SUBST CXXFLAGS, CFLAGS, and LDFLAGS ourselves.
+# (4) As another side effect, automake doesn't automatically include them
+# in Makefile.in.
+# (5) For libstdc++-v3, -fno-builtin must be present here so that a
+# non-conflicting form of std::exit can be guessed by AC_PROG_CXX, and
+# used in later tests.  This may not be necessary in libjava; I don't know.
+
+
+
+save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS -fno-builtin"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+# FIXME: Cleanup?
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  gcc_no_link=no
+else
+  gcc_no_link=yes
+fi
+
+if test x$gcc_no_link = xyes; then
+  # Setting cross_compile will disable run tests; it will
+  # also disable AC_CHECK_FILE but that's generally
+  # correct if we can't link.
+  cross_compiling=yes
+  EXEEXT=
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+	;;
+    conftest.$ac_ext )
+	# This is the source file.
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	# FIXME: I believe we export ac_cv_exeext for Libtool,
+	# but it would be cool to find out if it's true.  Does anybody
+	# maintain Libtool? --akim.
+	export ac_cv_exeext
+	break;;
+    * )
+	break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  export ac_cv_exeext
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+fi
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std1 is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std1.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${glibcxx_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  glibcxx_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    glibcxx_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CXX=$glibcxx_cv_prog_CXX
+if test -n "$CXX"; then
+  echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+  CXX=$ac_ct_CXX
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CXXFLAGS="$save_CXXFLAGS"
+
+
+
+
+
+am__api_version="1.9"
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	    break 3
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+done
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # We used to keeping the `.' as first argument, in order to
+  # allow $(mkdir_p) to be used without argument.  As in
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.  However this is wrong
+  # for two reasons:
+  #  1. if the package is installed by a user who cannot write `.'
+  #     make install will fail,
+  #  2. the above comment should most certainly read
+  #     $(mkdir_p) $(DESTDIR)$(somedir)
+  #     so it does not work when $(somedir) is undefined and
+  #     $(DESTDIR) is not.
+  #  To support the latter case, we have to write
+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+  #  so the `.' trick is pointless.
+  mkdir_p='mkdir -p --'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+all:
+	@echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+          ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='libjava'
+ VERSION='version-unused'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+depcc="$CC"   am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+depcc="$CXX"  am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AS+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AS"; then
+  ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AS="${ac_tool_prefix}as"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+  echo "$as_me:$LINENO: result: $AS" >&5
+echo "${ECHO_T}$AS" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+  ac_ct_AS=$AS
+  # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_AS"; then
+  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AS="as"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+  echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
+echo "${ECHO_T}$ac_ct_AS" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  AS=$ac_ct_AS
+else
+  AS="$ac_cv_prog_AS"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ld; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$LD"; then
+  ac_cv_prog_LD="$LD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_LD="${ac_tool_prefix}ld"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+LD=$ac_cv_prog_LD
+if test -n "$LD"; then
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_LD"; then
+  ac_ct_LD=$LD
+  # Extract the first word of "ld", so it can be a program name with args.
+set dummy ld; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_LD"; then
+  ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_LD="ld"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_LD=$ac_cv_prog_ac_ct_LD
+if test -n "$ac_ct_LD"; then
+  echo "$as_me:$LINENO: result: $ac_ct_LD" >&5
+echo "${ECHO_T}$ac_ct_LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  LD=$ac_ct_LD
+else
+  LD="$ac_cv_prog_LD"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  AR=$ac_ct_AR
+else
+  AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  RANLIB=$ac_ct_RANLIB
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+for ac_prog in jar fastjar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_JAR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$JAR"; then
+  ac_cv_prog_JAR="$JAR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_JAR="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+JAR=$ac_cv_prog_JAR
+if test -n "$JAR"; then
+  echo "$as_me:$LINENO: result: $JAR" >&5
+echo "${ECHO_T}$JAR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$JAR" && break
+done
+test -n "$JAR" || JAR="no"
+
+# Extract the first word of "zip", so it can be a program name with args.
+set dummy zip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_ZIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $ZIP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_ZIP" && ac_cv_path_ZIP="no"
+  ;;
+esac
+fi
+ZIP=$ac_cv_path_ZIP
+
+if test -n "$ZIP"; then
+  echo "$as_me:$LINENO: result: $ZIP" >&5
+echo "${ECHO_T}$ZIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "unzip", so it can be a program name with args.
+set dummy unzip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_UNZIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $UNZIP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_UNZIP" && ac_cv_path_UNZIP="unzip"
+  ;;
+esac
+fi
+UNZIP=$ac_cv_path_UNZIP
+
+if test -n "$UNZIP"; then
+  echo "$as_me:$LINENO: result: $UNZIP" >&5
+echo "${ECHO_T}$UNZIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+
+if test "$JAR" = no; then
+  BASH_JAR_TRUE=
+  BASH_JAR_FALSE='#'
+else
+  BASH_JAR_TRUE='#'
+  BASH_JAR_FALSE=
+fi
+
+if test "$ZIP" = no; then
+  if test "$JAR" = no; then
+    { { echo "$as_me:$LINENO: error: cannot find neither zip nor jar, cannot continue" >&5
+echo "$as_me: error: cannot find neither zip nor jar, cannot continue" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+else
+  # InfoZIP available, use the 'guaranteed' Bourne-shell JAR to build libjava
+  JAR=`pwd`/scripts/jar
+fi
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	    break 3
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+done
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
+    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+  enableval="$enable_maintainer_mode"
+  USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=no
+fi;
+  echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
+
+
+if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+
+
+# configure.host sets the following important variables
+#	libgcj_cflags    - host specific C compiler flags
+#	libgcj_cxxflags  - host specific C++ compiler flags
+#	libgcj_javaflags - host specific Java compiler flags
+
+libgcj_cflags=
+libgcj_cxxflags=
+libgcj_javaflags=
+
+. ${srcdir}/configure.host
+
+LIBGCJ_CFLAGS="${libgcj_cflags}"
+LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
+LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
+LIBGCJ_LD_SYMBOLIC="${libgcj_ld_symbolic}"
+
+
+
+
+
+# Only use libltdl for non-newlib builds.
+if test "x${with_newlib}" = "x" || test "x${with_newlib}" = "xno"; then
+   echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi4*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  # FIXME: Relying on posixy $() will cause problems for
+  #        cross-compilation, but unfortunately the echo tests do not
+  #        yet detect zsh echo's removal of \ escapes.
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext='$(test .$module = .yes && echo .so || echo .dylib)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd*)
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.01* | freebsdelf3.01*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case "$host_cpu" in
+  ia64*)
+    shrext='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*|k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+
+echo "$as_me:$LINENO: checking which variable specifies run-time library path" >&5
+echo $ECHO_N "checking which variable specifies run-time library path... $ECHO_C" >&6
+if test "${libltdl_cv_shlibpath_var+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  libltdl_cv_shlibpath_var="$shlibpath_var"
+fi
+echo "$as_me:$LINENO: result: $libltdl_cv_shlibpath_var" >&5
+echo "${ECHO_T}$libltdl_cv_shlibpath_var" >&6
+if test -n "$libltdl_cv_shlibpath_var"; then
+
+cat >>confdefs.h <<_ACEOF
+#define LTDL_SHLIBPATH_VAR "$libltdl_cv_shlibpath_var"
+_ACEOF
+
+fi
+
+fi
+
+                    ac_config_headers="$ac_config_headers include/config.h gcj/libgcj-config.h"
+
+
+# See if the user has requested runtime debugging.
+LIBGCJDEBUG="disable"
+
+# Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
+if test "${enable_libgcj_debug+set}" = set; then
+  enableval="$enable_libgcj_debug"
+  if test "$enable_libgcj_debug" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG 1
+_ACEOF
+
+    LIBGCJDEBUG="enable"
+  fi
+fi;
+
+# Determine which AWT peer libraries to build
+# Check whether --enable-java-awt or --disable-java-awt was given.
+if test "${enable_java_awt+set}" = set; then
+  enableval="$enable_java_awt"
+
+fi;
+
+peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
+use_xlib_awt=""
+use_gtk_awt=""
+use_qt_awt=""
+# The default toolkit to use is the first one specified.
+TOOLKIT=
+
+
+for peer in $peerlibs ; do
+  case $peer in
+    xlib)
+      if test "$no_x" = yes; then
+        echo "*** xlib peers requested but no X library available" 1>&2
+        exit 1
+      else
+        use_xlib_awt="yes"
+	if test -z "$TOOLKIT"; then
+	   TOOLKIT=gnu.awt.xlib.XToolkit
+	fi
+      fi
+      ;;
+    gtk)
+      if test "$no_x" = yes; then
+	 echo "*** gtk peers requested but no X library available" 1>&2
+	 exit 1
+      else
+	 use_gtk_awt=yes
+	 if test -z "$TOOLKIT"; then
+	    TOOLKIT=gnu.java.awt.peer.gtk.GtkToolkit
+	 fi
+      fi
+      ;;
+    qt)
+      if test "$no_x" = yes; then
+         # Perhaps we should admit the possibility of embedded Qt.
+	 echo "*** Qt peers requested but no X library available" 1>&2
+	 exit 1
+      else
+	 use_qt_awt=yes
+	 if test -z "$TOOLKIT"; then
+	    TOOLKIT=gnu.java.awt.peer.qt.QtToolkit
+	 fi
+      fi
+      ;;
+    no)
+      use_xlib_awt=
+      use_gtk_awt=
+      use_qt_awt=
+      break
+      ;;
+    *)
+      echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2
+      exit 1
+  esac
+done
+
+
+
+if test "$use_xlib_awt" = yes; then
+  XLIB_AWT_TRUE=
+  XLIB_AWT_FALSE='#'
+else
+  XLIB_AWT_TRUE='#'
+  XLIB_AWT_FALSE=
+fi
+
+
+# Create standard.omit based on decisions we just made.
+cp $srcdir/standard.omit.in standard.omit
+if test "$use_xlib_awt" != yes; then
+   echo gnu/awt/xlib >> standard.omit
+   echo gnu/gcj/xlib >> standard.omit
+fi
+
+if test -z "${with_multisubdir}"; then
+   builddotdot=.
+else
+   builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
+fi
+
+NATIVE=yes
+
+# Which gcj do we use?
+which_gcj=default
+built_gcc_dir="`cd ${builddotdot}/../../${host_subdir}/gcc && ${PWDCMD-pwd}`"
+if test -n "${with_cross_host}"; then
+  # We are being configured with a cross compiler. We can't
+  # use ac_exeext, because that is for the target platform.
+  NATIVE=no
+  cross_host_exeext=
+  case "${with_cross_host}" in
+     *mingw* | *cygwin*)
+         cross_host_exeext=.exe
+     ;;
+  esac
+  if test -x "${built_gcc_dir}/gcj${cross_host_exeext}"; then
+     if test x"$build_noncanonical" = x"$with_cross_host"; then
+        # Ordinary cross (host!=target and host=build)
+        which_gcj=built
+     else
+        # Canadian cross (host!=target and host!=build)
+        which_gcj=cross
+     fi
+  else
+     which_gcj=cross
+  fi
+else
+  # We are being configured with a native or crossed-native compiler
+  if test -x "${built_gcc_dir}/gcj${ac_exeext}"; then
+     if test x"$build" = x"$host"; then
+        # True native build (host=target and host=build)
+        which_gcj=built
+     else
+        # Crossed-native build (host=target and host!=build)
+        which_gcj=cross
+     fi
+  else
+     which_gcj=path
+  fi
+fi
+case "${which_gcj}" in
+   built)
+      GCJ="$built_gcc_dir/gcj -B`${PWDCMD-pwd}`/ -B$built_gcc_dir/"
+      GCJH='$(top_builddir)/$(MULTIBUILDTOP)../../$(host_subdir)/gcc/gcjh'
+   ;;
+   cross)
+      if test "x${with_newlib}" = "xyes"; then
+         # FIXME (comment): Why is this needed?
+         GCC_UNWIND_INCLUDE=
+         GCJ="${target_noncanonical}-gcj"
+      else
+         GCJ="${target_noncanonical}-gcj -B`${PWDCMD-pwd}`/"
+      fi
+      GCJH='$(target_noncanonical)-gcjh'
+   ;;
+   path)
+      GCJ="gcj -B`${PWDCMD-pwd}`/"
+      GCJH=gcjh
+   ;;
+esac
+
+
+
+# Create it, so that compile/link tests don't fail
+test -f libgcj.spec || touch libgcj.spec
+
+
+
+# Set up to configure Classpath.
+# FIXME: no supported way to pass args in autoconf.
+ac_configure_args="$ac_configure_args --with-fastjar=$JAR"
+ac_configure_args="$ac_configure_args --enable-tool-wrappers"
+ac_configure_args="$ac_configure_args --disable-load-library"
+ac_configure_args="$ac_configure_args --${LIBGCJDEBUG}-debug"
+ac_configure_args="$ac_configure_args --enable-default-toolkit=$TOOLKIT"
+dir1=`cd $srcdir && pwd`
+dir2=`pwd`
+ac_configure_args="$ac_configure_args --with-vm-classes=$dir1:$dir2"
+ac_configure_args="$ac_configure_args --disable-core-jni"
+ac_configure_args="$ac_configure_args --disable-examples"
+ac_configure_args="$ac_configure_args --with-glibj=build"
+if test "$plugin_enabled" != yes; then
+  ac_configure_args="$ac_configure_args --disable-plugin"
+fi
+if test "$gconf_enabled" != yes; then
+  ac_configure_args="$ac_configure_args --disable-gconf-peer"
+  ac_configure_args="$ac_configure_args --enable-default-preferences-peer=gnu.java.util.prefs.FileBasedFactory"
+fi
+if test "$use_gtk_awt" != yes; then
+  ac_configure_args="$ac_configure_args --disable-gtk-peer"
+fi
+if test "$use_qt_awt" != yes; then
+  ac_configure_args="$ac_configure_args --disable-qt-peer"
+else
+  # We need this as qt is disabled by default in classpath.
+  ac_configure_args="$ac_configure_args --enable-qt-peer"
+fi
+
+# Only use libltdl for non-newlib builds.
+if test "x${with_newlib}" = "x" || test "x${with_newlib}" = "xno"; then
+     case $enable_ltdl_convenience in
+  no) { { echo "$as_me:$LINENO: error: this package needs a convenience libltdl" >&5
+echo "$as_me: error: this package needs a convenience libltdl" >&2;}
+   { (exit 1); exit 1; }; } ;;
+  "") enable_ltdl_convenience=yes
+      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+  esac
+  LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la
+  INCLTDL='-I${top_srcdir}/''libltdl'
+
+
+   DIRLTDL=libltdl
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_LTDL 1
+_ACEOF
+
+   # Sigh.  Libtool's macro doesn't do the right thing.
+   INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
+   # FIXME: this is a hack.
+   sub_auxdir="`cd $ac_aux_dir && ${PWDCMD-pwd}`"
+   ac_configure_args="$ac_configure_args --with-auxdir=$sub_auxdir"
+fi
+
+
+
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval="$enable_shared"
+  p=${PACKAGE-default}
+case $enableval in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+  enable_shared=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_shared=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_shared=yes
+fi;
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval="$enable_static"
+  p=${PACKAGE-default}
+case $enableval in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+  enable_static=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_static=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_static=yes
+fi;
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+  enableval="$enable_fast_install"
+  p=${PACKAGE-default}
+case $enableval in
+yes) enable_fast_install=yes ;;
+no) enable_fast_install=no ;;
+*)
+  enable_fast_install=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_fast_install=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_fast_install=yes
+fi;
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval="$with_gnu_ld"
+  test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi;
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  echo "$as_me:$LINENO: checking for ld used by GCC" >&5
+echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | [A-Za-z]:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+	test "$with_gnu_ld" != no && break
+      else
+	test "$with_gnu_ld" != yes && break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+  lt_cv_prog_gnu_ld=yes
+else
+  lt_cv_prog_gnu_ld=no
+fi
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
+reload_flag=$lt_cv_ld_reload_flag
+test -n "$reload_flag" && reload_flag=" $reload_flag"
+
+echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
+echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
+if test "${lt_cv_path_NM+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    test -z "$ac_dir" && ac_dir=.
+    tmp_nm=$ac_dir/${ac_tool_prefix}nm
+    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
+      # Check to see if the nm accepts a BSD-compat flag.
+      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+      #   nm: unknown option "B" ignored
+      # Tru64's nm complains that /dev/null is an invalid object file
+      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
+	lt_cv_path_NM="$tmp_nm -B"
+	break
+      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+	lt_cv_path_NM="$tmp_nm -p"
+	break
+      else
+	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	continue # so that we can try to find one that supports BSD flags
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi
+fi
+
+NM="$lt_cv_path_NM"
+echo "$as_me:$LINENO: result: $NM" >&5
+echo "${ECHO_T}$NM" >&6
+
+echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
+echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [regex]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given egrep regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi4*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin* | mingw* |pw32*)
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  # this will be overwritten by pass_all, but leave it in just in case
+  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  case "$host_os" in
+  rhapsody* | darwin1.012)
+    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
+    ;;
+  *) # Darwin 1.3 on
+    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+    ;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | kfreebsd*-gnu)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20*|hpux11*)
+  case $host_cpu in
+  hppa*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+    lt_cv_file_magic_cmd=/usr/bin/file
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+    lt_cv_file_magic_cmd=/usr/bin/file
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  esac
+  ;;
+
+irix5* | irix6*)
+  case $host_os in
+  irix5*)
+    # this will be overridden with pass_all, but let us keep it just in case
+    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+    ;;
+  *)
+    case $LD in
+    *-32|*"-32 ") libmagic=32-bit;;
+    *-n32|*"-n32 ") libmagic=N32;;
+    *-64|*"-64 ") libmagic=64-bit;;
+    *) libmagic=never-match;;
+    esac
+    # this will be overridden with pass_all, but let us keep it just in case
+    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+    ;;
+  esac
+  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux-gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd* | knetbsd*-gnu)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
+  fi
+  ;;
+
+newsos6)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+osf3* | osf4* | osf5*)
+  # this will be overridden with pass_all, but let us keep it just in case
+  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sco3.2v5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  lt_cv_file_magic_test_file=/lib/libc.so
+  ;;
+
+sysv5uw[78]* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  case $host_vendor in
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  esac
+  ;;
+esac
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+
+
+
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+
+# find the maximum length of command line arguments
+echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+    i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+  esac
+
+fi
+
+if test -n "$lt_cv_sys_max_cmd_len" ; then
+  echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
+else
+  echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+fi
+
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+  /*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+  ?:/*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+  ;;
+  *)
+  ac_save_MAGIC_CMD="$MAGIC_CMD"
+  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="/usr/bin:$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    egrep "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  MAGIC_CMD="$ac_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+  /*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+  ?:/*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+  ;;
+  *)
+  ac_save_MAGIC_CMD="$MAGIC_CMD"
+  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="/usr/bin:$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    egrep "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  MAGIC_CMD="$ac_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  RANLIB=$ac_ct_RANLIB
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+
+# Check for any special flags to pass to ltconfig.
+libtool_flags="--cache-file=$cache_file"
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
+test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval="$enable_libtool_lock"
+
+fi;
+test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
+test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+
+
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+  withval="$with_pic"
+  pic_mode="$withval"
+else
+  pic_mode=default
+fi;
+test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
+test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 5883 "configure"' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case "`/usr/bin/file conftest.o`" in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case "`/usr/bin/file conftest.o`" in
+    *32-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+     if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  lt_cv_cc_needs_belf=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_cc_needs_belf=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+
+
+esac
+
+
+# Save cache, so that ltconfig can load it
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+# Actually configure libtool.  ac_aux_dir is where install-sh is found.
+AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
+AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
+objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
+deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
+$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
+|| { { echo "$as_me:$LINENO: error: libtool configure failed" >&5
+echo "$as_me: error: libtool configure failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+# Reload cache, that may have been modified by ltconfig
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+echo "$as_me:$LINENO: result: $CXXCPP" >&5
+echo "${ECHO_T}$CXXCPP" >&6
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
+lt_save_CC="$CC"
+lt_save_CFLAGS="$CFLAGS"
+AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
+MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
+AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
+objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
+deplibs_check_method="$deplibs_check_method" \
+file_magic_cmd="$file_magic_cmd" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
+--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
+|| { { echo "$as_me:$LINENO: error: libtool tag configuration failed" >&5
+echo "$as_me: error: libtool tag configuration failed" >&2;}
+   { (exit 1); exit 1; }; }
+CC="$lt_save_CC"
+CFLAGS="$lt_save_CFLAGS"
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+
+
+
+
+
+
+
+for ac_prog in gcj
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$GCJ"; then
+  ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_GCJ="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+GCJ=$ac_cv_prog_GCJ
+if test -n "$GCJ"; then
+  echo "$as_me:$LINENO: result: $GCJ" >&5
+echo "${ECHO_T}$GCJ" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$GCJ" && break
+done
+test -n "$GCJ" || GCJ="gcj"
+
+test -z "$GCJ" && { { echo "$as_me:$LINENO: error: no acceptable gcj found in \$PATH" >&5
+echo "$as_me: error: no acceptable gcj found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+if test "x${GCJFLAGS-unset}" = xunset; then
+   GCJFLAGS="-g -O2"
+fi
+
+
+depcc="$GCJ"  am_compiler_list='gcc3 gcc'
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_GCJ_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_GCJ_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_GCJ_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_GCJ_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_GCJ_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_GCJ_dependencies_compiler_type" >&6
+GCJDEPMODE=depmode=$am_cv_GCJ_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_GCJ_dependencies_compiler_type" = gcc3; then
+  am__fastdepGCJ_TRUE=
+  am__fastdepGCJ_FALSE='#'
+else
+  am__fastdepGCJ_TRUE='#'
+  am__fastdepGCJ_FALSE=
+fi
+
+
+
+
+LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
+lt_save_CC="$CC"
+lt_save_CFLAGS="$CFLAGS"
+AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
+MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
+AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
+objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
+deplibs_check_method="$deplibs_check_method" \
+file_magic_cmd="$file_magic_cmd" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
+--build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
+|| { { echo "$as_me:$LINENO: error: libtool tag configuration failed" >&5
+echo "$as_me: error: libtool tag configuration failed" >&2;}
+   { (exit 1); exit 1; }; }
+CC="$lt_save_CC"
+CFLAGS="$lt_save_CFLAGS"
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+
+
+
+if test "x$CC" != xcc; then
+  echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
+echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
+echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
+fi
+set dummy $CC; ac_cc=`echo $2 |
+		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+   test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); };
+then
+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+  if test "x$CC" != xcc; then
+    # Test first that cc exists at all.
+    if { ac_try='cc -c conftest.$ac_ext >&5'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+      ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+      if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); };
+      then
+	# cc works too.
+	:
+      else
+	# cc exists but doesn't like -o.
+	eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      fi
+    fi
+  fi
+else
+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f conftest*
+
+fi
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_MINUS_C_MINUS_O 1
+_ACEOF
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+
+
+
+
+subdirs="$subdirs classpath libltdl"
+
+
+# The -no-testsuite modules omit the test subdir.
+
+
+if test -d $srcdir/testsuite; then
+  TESTSUBDIR_TRUE=
+  TESTSUBDIR_FALSE='#'
+else
+  TESTSUBDIR_TRUE='#'
+  TESTSUBDIR_FALSE=
+fi
+
+
+# Should the runtime set system properties by examining the
+# environment variable GCJ_PROPERTIES?
+# Check whether --enable-getenv-properties or --disable-getenv-properties was given.
+if test "${enable_getenv_properties+set}" = set; then
+  enableval="$enable_getenv_properties"
+
+fi;
+
+# Whether GCJ_PROPERTIES is used depends on the target.
+if test -z "$enable_getenv_properties"; then
+   enable_getenv_properties=${enable_getenv_properties_default-yes}
+fi
+if test "$enable_getenv_properties" = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DISABLE_GETENV_PROPERTIES 1
+_ACEOF
+
+fi
+
+# Whether we should use arguments to main()
+if test -z "$enable_main_args"; then
+   enable_main_args=${enable_main_args_default-yes}
+fi
+if test "$enable_main_args" = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DISABLE_MAIN_ARGS 1
+_ACEOF
+
+fi
+
+
+# Should we use hashtable-based synchronization?
+# Currently works only for Linux X86/ia64
+# Typically faster and more space-efficient
+# Check whether --enable-hash-synchronization or --disable-hash-synchronization was given.
+if test "${enable_hash_synchronization+set}" = set; then
+  enableval="$enable_hash_synchronization"
+
+fi;
+
+if test -z "$enable_hash_synchronization"; then
+   enable_hash_synchronization=$enable_hash_synchronization_default
+fi
+
+
+# Check whether --with-java-home or --without-java-home was given.
+if test "${with_java_home+set}" = set; then
+  withval="$with_java_home"
+  JAVA_HOME="${withval}"
+else
+  JAVA_HOME=""
+fi;
+
+
+if test ! -z "$JAVA_HOME"; then
+  JAVA_HOME_SET_TRUE=
+  JAVA_HOME_SET_FALSE='#'
+else
+  JAVA_HOME_SET_TRUE='#'
+  JAVA_HOME_SET_FALSE=
+fi
+
+
+
+# What is the native OS API for MinGW?
+
+# Check whether --with-win32-nlsapi or --without-win32-nlsapi was given.
+if test "${with_win32_nlsapi+set}" = set; then
+  withval="$with_win32_nlsapi"
+  case "${withval}" in
+  ansi) with_win32_nlsapi=ansi ;;
+  unicows) with_win32_nlsapi=unicows ;;
+  unicode) with_win32_nlsapi=unicode ;;
+  *) { { echo "$as_me:$LINENO: error: Bad value ${withval} for --with-win32-nlsapi." >&5
+echo "$as_me: error: Bad value ${withval} for --with-win32-nlsapi." >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  with_win32_nlsapi=ansi
+fi;
+
+case "${with_win32_nlsapi}" in
+  unicows | unicode)
+
+cat >>confdefs.h <<\_ACEOF
+#define MINGW_LIBGCJ_UNICODE 1
+_ACEOF
+
+    ;;
+esac
+
+# configure.host sets slow_pthread_self if the synchronization code should
+# try to avoid pthread_self calls by caching thread IDs in a hashtable.
+if test "${slow_pthread_self}" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define SLOW_PTHREAD_SELF 1
+_ACEOF
+
+fi
+
+# Check for gc debugging.  This option is handled both here and in the GC.
+# Check whether --enable-gc-debug or --disable-gc-debug was given.
+if test "${enable_gc_debug+set}" = set; then
+  enableval="$enable_gc_debug"
+   if test "$enable_gc_debug" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define LIBGCJ_GC_DEBUG 1
+_ACEOF
+
+  fi
+fi;
+
+# See if the user has the interpreter included.
+# Check whether --enable-interpreter or --disable-interpreter was given.
+if test "${enable_interpreter+set}" = set; then
+  enableval="$enable_interpreter"
+  if test "$enable_interpreter" = yes; then
+    # This can also be set in configure.host.
+    libgcj_interpreter=yes
+  elif test "$enable_interpreter" = no; then
+    libgcj_interpreter=no
+  fi
+fi;
+
+if test "$libgcj_interpreter" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define INTERPRETER 1
+_ACEOF
+
+fi
+INTERPRETER="$libgcj_interpreter"
+
+
+echo "$as_me:$LINENO: checking for exception model to use" >&5
+echo $ECHO_N "checking for exception model to use... $ECHO_C" >&6
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
+if test "${enable_sjlj_exceptions+set}" = set; then
+  enableval="$enable_sjlj_exceptions"
+  :
+else
+  cat > conftest.$ac_ext << EOF
+#line 6886 "configure"
+struct S { ~S(); };
+void bar();
+void foo()
+{
+  S s;
+  bar();
+}
+EOF
+old_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS=-S
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
+    enable_sjlj_exceptions=yes
+  elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
+    enable_sjlj_exceptions=no
+  fi
+fi
+CXXFLAGS="$old_CXXFLAGS"
+rm -f conftest*
+fi;
+if test x$enable_sjlj_exceptions = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define SJLJ_EXCEPTIONS 1
+_ACEOF
+
+  ac_exception_model_name=sjlj
+elif test x$enable_sjlj_exceptions = xno; then
+  ac_exception_model_name="call frame"
+else
+  { { echo "$as_me:$LINENO: error: unable to detect exception model" >&5
+echo "$as_me: error: unable to detect exception model" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+echo "$as_me:$LINENO: result: $ac_exception_model_name" >&5
+echo "${ECHO_T}$ac_exception_model_name" >&6
+
+# If we are non using SJLJ exceptions, and this host does not have support
+# for unwinding from a signal handler, enable checked dereferences and divides.
+if test $can_unwind_signal = no && test $enable_sjlj_exceptions = no; then
+  CHECKREFSPEC=-fcheck-references
+  DIVIDESPEC=-fuse-divide-subroutine
+  EXCEPTIONSPEC=
+fi
+
+# See if the user wants to disable java.net.  This is the mildly
+# ugly way that we admit that target-side configuration sucks.
+# Check whether --enable-java-net or --disable-java-net was given.
+if test "${enable_java_net+set}" = set; then
+  enableval="$enable_java_net"
+
+fi;
+
+# Whether java.net is built by default can depend on the target.
+if test -z "$enable_java_net"; then
+   enable_java_net=${enable_java_net_default-yes}
+fi
+if test "$enable_java_net" = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DISABLE_JAVA_NET 1
+_ACEOF
+
+fi
+
+# See if the user wants to configure without libffi.  Some
+# architectures don't support it, and default values are set in
+# configure.host.
+
+# Check whether --with-libffi or --without-libffi was given.
+if test "${with_libffi+set}" = set; then
+  withval="$with_libffi"
+  :
+else
+  with_libffi=${with_libffi_default-yes}
+fi;
+
+LIBFFI=
+LIBFFIINCS=
+if test "$with_libffi" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_LIBFFI 1
+_ACEOF
+
+   LIBFFI=../libffi/libffi_convenience.la
+   LIBFFIINCS='-I$(top_srcdir)/../libffi/include -I../libffi/include'
+fi
+
+
+
+# See if the user wants to disable JVMPI support.
+# Check whether --enable-jvmpi or --disable-jvmpi was given.
+if test "${enable_jvmpi+set}" = set; then
+  enableval="$enable_jvmpi"
+
+fi;
+
+if test "$enable_jvmpi" != no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_JVMPI 1
+_ACEOF
+
+fi
+
+# If the target is an eCos system, use the appropriate eCos
+# I/O routines.
+# FIXME: this should not be a local option but a global target
+# system; at present there is no eCos target.
+TARGET_ECOS=${PROCESS-"no"}
+
+# Check whether --with-ecos or --without-ecos was given.
+if test "${with_ecos+set}" = set; then
+  withval="$with_ecos"
+  TARGET_ECOS="$with_ecos"
+
+fi;
+
+PLATFORM_INNER_NAT_HDRS=
+case "$TARGET_ECOS" in
+   no) case "$host" in
+      *mingw*)
+            PLATFORM=Win32
+	    PLATFORMNET=Win32
+	    PLATFORMH=win32.h
+
+echo "$as_me:$LINENO: checking whether 'ld' is at least 2.13" >&5
+echo $ECHO_N "checking whether 'ld' is at least 2.13... $ECHO_C" >&6
+LD_PROG=`$CC --print-prog-name=ld`
+LD_VERSION=`$LD_PROG --version`
+LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
+LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
+if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
+  LD_OK="ok"
+else
+  if expr "$LD_VERSION_MAJOR" = 2 && expr "$LD_VERSION_MINOR" \>= 13 > /dev/null; then
+    LD_OK="ok"
+  fi
+fi
+if test "x$LD_OK" != x; then
+  echo "$as_me:$LINENO: result: yes; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR" >&5
+echo "${ECHO_T}yes; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR" >&6
+else
+  echo "$as_me:$LINENO: result: no; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR" >&5
+echo "${ECHO_T}no; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR" >&6
+  { echo "$as_me:$LINENO: WARNING: ld <2.13 detected; enabling JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS hack..." >&5
+echo "$as_me: WARNING: ld <2.13 detected; enabling JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS hack..." >&2;}
+
+cat >>confdefs.h <<\_ACEOF
+#define JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS 1
+_ACEOF
+
+fi
+      ;;
+      *)
+            PLATFORM=Posix
+	    PLATFORMNET=Posix
+	    PLATFORMH=posix.h
+	    PLATFORM_INNER_NAT_HDRS='java/lang/ConcreteProcess$$ProcessManager.h'
+      ;;
+      esac
+      ;;
+   *)
+      PLATFORM=Ecos
+      PLATFORMNET=NoNet
+
+cat >>confdefs.h <<\_ACEOF
+#define ECOS 1
+_ACEOF
+
+      PLATFORMH=posix.h
+      ;;
+esac
+
+          ac_config_links="$ac_config_links include/platform.h:include/$PLATFORMH"
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdint.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "uint32_t" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INT32_DEFINED 1
+_ACEOF
+
+fi
+rm -f conftest*
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <inttypes.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "uint32_t" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INT32_DEFINED 1
+_ACEOF
+
+fi
+rm -f conftest*
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "u_int32_t" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BSD_INT32_DEFINED 1
+_ACEOF
+
+fi
+rm -f conftest*
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/config.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "u_int32_t" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BSD_INT32_DEFINED 1
+_ACEOF
+
+fi
+rm -f conftest*
+
+
+
+
+if test "$PLATFORM" = Win32; then
+  USING_WIN32_PLATFORM_TRUE=
+  USING_WIN32_PLATFORM_FALSE='#'
+else
+  USING_WIN32_PLATFORM_TRUE='#'
+  USING_WIN32_PLATFORM_FALSE=
+fi
+
+
+
+if test "$PLATFORM" = Posix || test "$PLATFORM" = Ecos; then
+  USING_POSIX_PLATFORM_TRUE=
+  USING_POSIX_PLATFORM_FALSE='#'
+else
+  USING_POSIX_PLATFORM_TRUE='#'
+  USING_POSIX_PLATFORM_FALSE=
+fi
+
+
+case "$host" in
+  *-darwin*) DARWIN_CRT=true ;;
+  *) DARWIN_CRT=false ;;
+esac
+
+
+if $DARWIN_CRT; then
+  USING_DARWIN_CRT_TRUE=
+  USING_DARWIN_CRT_FALSE='#'
+else
+  USING_DARWIN_CRT_TRUE='#'
+  USING_DARWIN_CRT_FALSE=
+fi
+
+
+# These may not be defined in a non-ANS conformant embedded system.
+# FIXME: Should these case a runtime exception in that case?
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <time.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "mktime" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MKTIME 1
+_ACEOF
+
+fi
+rm -f conftest*
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <time.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "localtime" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOCALTIME 1
+_ACEOF
+
+fi
+rm -f conftest*
+
+
+# Create the subdirectory for natFile.cc, or the attempt
+# to create the link will fail.
+test -d java || mkdir java
+test -d java/io || mkdir java/io
+test -d gnu || mkdir gnu
+          ac_config_links="$ac_config_links java/io/natFile.cc:java/io/natFile${FILE-${PLATFORM}}.cc"
+
+
+# Likewise for ConcreteProcess.java and natConcreteProcess.cc.
+test -d java/lang || mkdir java/lang
+          ac_config_links="$ac_config_links java/lang/ConcreteProcess.java:java/lang/${PLATFORM}Process.java"
+
+          ac_config_links="$ac_config_links java/lang/natConcreteProcess.cc:java/lang/nat${PLATFORM}Process.cc"
+
+
+# Likewise for natInetAddress.cc and natVMNetworkInterface.cc.
+test -d java/net || mkdir java/net
+          ac_config_links="$ac_config_links java/net/natInetAddress.cc:java/net/natInetAddress${PLATFORMNET}.cc"
+
+          ac_config_links="$ac_config_links java/net/natVMNetworkInterface.cc:java/net/natVMNetworkInterface${PLATFORMNET}.cc"
+
+
+# Likewise for natPlainSocketImpl.cc and natPlainDatagramSocketImpl.cc.
+test -d gnu/java || mkdir gnu/java
+test -d gnu/java/net || mkdir gnu/java/net
+          ac_config_links="$ac_config_links gnu/java/net/natPlainSocketImpl.cc:gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc"
+
+          ac_config_links="$ac_config_links gnu/java/net/natPlainDatagramSocketImpl.cc:gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc"
+
+
+# Likewise for natPipeImpl.cc and natSelectorImpl.cc.
+test -d gnu/java/nio || mkdir gnu/java/nio
+          ac_config_links="$ac_config_links gnu/java/nio/natPipeImpl.cc:gnu/java/nio/natPipeImpl${PLATFORM}.cc"
+
+          ac_config_links="$ac_config_links gnu/java/nio/natSelectorImpl.cc:gnu/java/nio/natSelectorImpl${PLATFORM}.cc"
+
+test -d gnu/java/nio/channels || mkdir gnu/java/nio/channels
+          ac_config_links="$ac_config_links gnu/java/nio/channels/natFileChannelImpl.cc:gnu/java/nio/channels/natFileChannel${FILE-${PLATFORM}}.cc"
+
+
+case "${host}" in
+    *mingw*)
+      SYSTEMSPEC="-lgdi32 -lws2_32"
+      if test "${with_win32_nlsapi}" = "unicows"; then
+        SYSTEMSPEC="-lunicows $SYSTEMSPEC"
+      fi
+    ;;
+    *)
+      SYSTEMSPEC=
+    ;;
+esac
+
+
+LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
+
+
+
+# Check whether --with-system-zlib or --without-system-zlib was given.
+if test "${with_system_zlib+set}" = set; then
+  withval="$with_system_zlib"
+
+fi;
+ZLIBSPEC=
+
+ZLIBTESTSPEC=
+
+
+echo "$as_me:$LINENO: checking for X" >&5
+echo $ECHO_N "checking for X... $ECHO_C" >&6
+
+
+# Check whether --with-x or --without-x was given.
+if test "${with_x+set}" = set; then
+  withval="$with_x"
+
+fi;
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+  # The user explicitly disabled X.
+  have_x=disabled
+else
+  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
+    # Both variables are already set.
+    have_x=yes
+  else
+    if test "${ac_cv_have_x+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=no ac_x_libraries=no
+rm -fr conftest.dir
+if mkdir conftest.dir; then
+  cd conftest.dir
+  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
+  cat >Imakefile <<'_ACEOF'
+acfindx:
+	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
+_ACEOF
+  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
+    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+    for ac_extension in a so sl; do
+      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
+	 test -f $ac_im_libdir/libX11.$ac_extension; then
+	ac_im_usrlibdir=$ac_im_libdir; break
+      fi
+    done
+    # Screen out bogus values from the imake configuration.  They are
+    # bogus both because they are the default anyway, and because
+    # using them would break gcc on systems where it needs fixed includes.
+    case $ac_im_incroot in
+	/usr/include) ;;
+	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+    esac
+    case $ac_im_usrlibdir in
+	/usr/lib | /lib) ;;
+	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+    esac
+  fi
+  cd ..
+  rm -fr conftest.dir
+fi
+
+# Standard set of common directories for X headers.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ac_x_header_dirs='
+/usr/X11/include
+/usr/X11R6/include
+/usr/X11R5/include
+/usr/X11R4/include
+
+/usr/include/X11
+/usr/include/X11R6
+/usr/include/X11R5
+/usr/include/X11R4
+
+/usr/local/X11/include
+/usr/local/X11R6/include
+/usr/local/X11R5/include
+/usr/local/X11R4/include
+
+/usr/local/include/X11
+/usr/local/include/X11R6
+/usr/local/include/X11R5
+/usr/local/include/X11R4
+
+/usr/X386/include
+/usr/x386/include
+/usr/XFree86/include/X11
+
+/usr/include
+/usr/local/include
+/usr/unsupported/include
+/usr/athena/include
+/usr/local/x11r5/include
+/usr/lpp/Xamples/include
+
+/usr/openwin/include
+/usr/openwin/share/include'
+
+if test "$ac_x_includes" = no; then
+  # Guess where to find include files, by looking for Xlib.h.
+  # First, try using that file with no special directory specified.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <X11/Xlib.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  for ac_dir in $ac_x_header_dirs; do
+  if test -r "$ac_dir/X11/Xlib.h"; then
+    ac_x_includes=$ac_dir
+    break
+  fi
+done
+fi
+rm -f conftest.err conftest.$ac_ext
+fi # $ac_x_includes = no
+
+if test "$ac_x_libraries" = no; then
+  # Check for the libraries.
+  # See if we find them without any special options.
+  # Don't add to $LIBS permanently.
+  ac_save_LIBS=$LIBS
+  LIBS="-lX11 $LIBS"
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <X11/Xlib.h>
+int
+main ()
+{
+XrmInitialize ()
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  LIBS=$ac_save_LIBS
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+LIBS=$ac_save_LIBS
+for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+do
+  # Don't even attempt the hair of trying to link an X program!
+  for ac_extension in a so sl; do
+    if test -r $ac_dir/libXt.$ac_extension; then
+      ac_x_libraries=$ac_dir
+      break 2
+    fi
+  done
+done
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = no
+
+if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
+  # Didn't find X anywhere.  Cache the known absence of X.
+  ac_cv_have_x="have_x=no"
+else
+  # Record where we found X for the cache.
+  ac_cv_have_x="have_x=yes \
+		ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
+fi
+fi
+
+  fi
+  eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+  echo "$as_me:$LINENO: result: $have_x" >&5
+echo "${ECHO_T}$have_x" >&6
+  no_x=yes
+else
+  # If each of the values was on the command line, it overrides each guess.
+  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+  # Update the cache value to reflect the command line values.
+  ac_cv_have_x="have_x=yes \
+		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
+  echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
+echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
+fi
+
+if test "$no_x" = yes; then
+  # Not all programs may use this symbol, but it does not hurt to define it.
+
+cat >>confdefs.h <<\_ACEOF
+#define X_DISPLAY_MISSING 1
+_ACEOF
+
+  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+else
+  if test -n "$x_includes"; then
+    X_CFLAGS="$X_CFLAGS -I$x_includes"
+  fi
+
+  # It would also be nice to do this for all -L options, not just this one.
+  if test -n "$x_libraries"; then
+    X_LIBS="$X_LIBS -L$x_libraries"
+    # For Solaris; some versions of Sun CC require a space after -R and
+    # others require no space.  Words are not sufficient . . . .
+    case `(uname -sr) 2>/dev/null` in
+    "SunOS 5"*)
+      echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
+echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
+      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
+      if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_R_nospace=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_R_nospace=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+      if test $ac_R_nospace = yes; then
+	echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+	X_LIBS="$X_LIBS -R$x_libraries"
+      else
+	LIBS="$ac_xsave_LIBS -R $x_libraries"
+	if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_R_space=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_R_space=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+	if test $ac_R_space = yes; then
+	  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+	  X_LIBS="$X_LIBS -R $x_libraries"
+	else
+	  echo "$as_me:$LINENO: result: neither works" >&5
+echo "${ECHO_T}neither works" >&6
+	fi
+      fi
+      LIBS=$ac_xsave_LIBS
+    esac
+  fi
+
+  # Check for system-dependent libraries X programs must link with.
+  # Do this before checking for the system-independent R6 libraries
+  # (-lICE), since we may need -lsocket or whatever for X linking.
+
+  if test "$ISC" = yes; then
+    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+  else
+    # Martyn Johnson says this is needed for Ultrix, if the X
+    # libraries were built with DECnet support.  And Karl Berry says
+    # the Alpha needs dnet_stub (dnet does not exist).
+    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
+    if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char XOpenDisplay ();
+int
+main ()
+{
+XOpenDisplay ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
+echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
+if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dnet_ntoa ();
+int
+main ()
+{
+dnet_ntoa ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dnet_dnet_ntoa=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dnet_dnet_ntoa=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
+if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+fi
+
+    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+      echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
+echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
+if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet_stub  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dnet_ntoa ();
+int
+main ()
+{
+dnet_ntoa ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dnet_stub_dnet_ntoa=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dnet_stub_dnet_ntoa=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
+if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+fi
+
+    fi
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+    LIBS="$ac_xsave_LIBS"
+
+    # msh at cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+    # to get the SysV transport functions.
+    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
+    # needs -lnsl.
+    # The nsl library prevents programs from opening the X display
+    # on Irix 5.2, according to T.E. Dickey.
+    # The functions gethostbyname, getservbyname, and inet_addr are
+    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
+    echo "$as_me:$LINENO: checking for gethostbyname" >&5
+echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
+if test "${ac_cv_func_gethostbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define gethostbyname innocuous_gethostbyname
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char gethostbyname (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef gethostbyname
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char gethostbyname ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+char (*f) () = gethostbyname;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != gethostbyname;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_gethostbyname=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
+
+    if test $ac_cv_func_gethostbyname = no; then
+      echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_nsl_gethostbyname=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
+if test $ac_cv_lib_nsl_gethostbyname = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+fi
+
+      if test $ac_cv_lib_nsl_gethostbyname = no; then
+	echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
+echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
+if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_bsd_gethostbyname=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_bsd_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
+if test $ac_cv_lib_bsd_gethostbyname = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
+fi
+
+      fi
+    fi
+
+    # lieder at skyler.mavd.honeywell.com says without -lsocket,
+    # socket/setsockopt and other routines are undefined under SCO ODT
+    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
+    # on later versions), says Simon Leinen: it contains gethostby*
+    # variants that don't use the name server (or something).  -lsocket
+    # must be given before -lnsl if both are needed.  We assume that
+    # if connect needs -lnsl, so does gethostbyname.
+    echo "$as_me:$LINENO: checking for connect" >&5
+echo $ECHO_N "checking for connect... $ECHO_C" >&6
+if test "${ac_cv_func_connect+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define connect to an innocuous variant, in case <limits.h> declares connect.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define connect innocuous_connect
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char connect (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef connect
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char connect ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_connect) || defined (__stub___connect)
+choke me
+#else
+char (*f) () = connect;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != connect;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_connect=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_connect=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
+echo "${ECHO_T}$ac_cv_func_connect" >&6
+
+    if test $ac_cv_func_connect = no; then
+      echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
+echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_connect+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char connect ();
+int
+main ()
+{
+connect ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_socket_connect=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_connect=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
+if test $ac_cv_lib_socket_connect = yes; then
+  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+fi
+
+    fi
+
+    # Guillermo Gomez says -lposix is necessary on A/UX.
+    echo "$as_me:$LINENO: checking for remove" >&5
+echo $ECHO_N "checking for remove... $ECHO_C" >&6
+if test "${ac_cv_func_remove+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define remove to an innocuous variant, in case <limits.h> declares remove.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define remove innocuous_remove
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char remove (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef remove
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char remove ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_remove) || defined (__stub___remove)
+choke me
+#else
+char (*f) () = remove;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != remove;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_remove=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_remove=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
+echo "${ECHO_T}$ac_cv_func_remove" >&6
+
+    if test $ac_cv_func_remove = no; then
+      echo "$as_me:$LINENO: checking for remove in -lposix" >&5
+echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
+if test "${ac_cv_lib_posix_remove+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char remove ();
+int
+main ()
+{
+remove ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_posix_remove=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_posix_remove=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
+echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
+if test $ac_cv_lib_posix_remove = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+fi
+
+    fi
+
+    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+    echo "$as_me:$LINENO: checking for shmat" >&5
+echo $ECHO_N "checking for shmat... $ECHO_C" >&6
+if test "${ac_cv_func_shmat+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shmat innocuous_shmat
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shmat (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shmat
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shmat ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_shmat) || defined (__stub___shmat)
+choke me
+#else
+char (*f) () = shmat;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shmat;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_shmat=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shmat=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
+echo "${ECHO_T}$ac_cv_func_shmat" >&6
+
+    if test $ac_cv_func_shmat = no; then
+      echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
+echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
+if test "${ac_cv_lib_ipc_shmat+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lipc  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shmat ();
+int
+main ()
+{
+shmat ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_ipc_shmat=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ipc_shmat=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
+echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
+if test $ac_cv_lib_ipc_shmat = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+fi
+
+    fi
+  fi
+
+  # Check for libraries that X11R6 Xt/Xaw programs need.
+  ac_save_LDFLAGS=$LDFLAGS
+  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+  # check for ICE first), but we must link in the order -lSM -lICE or
+  # we get undefined symbols.  So assume we have SM if we have ICE.
+  # These have to be linked with before -lX11, unlike the other
+  # libraries we check for below, so use a different variable.
+  # John Interrante, Karl Berry
+  echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
+echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
+if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char IceConnectionNumber ();
+int
+main ()
+{
+IceConnectionNumber ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_ICE_IceConnectionNumber=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ICE_IceConnectionNumber=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
+if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
+  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+fi
+
+  LDFLAGS=$ac_save_LDFLAGS
+
+fi
+
+
+# FIXME: this should be _libs on some hosts.
+libsubdir=.libs
+
+# extra LD Flags which are required for targets
+case "${host}" in
+*-*-darwin[0-7].*)
+    # For now we have to disable it on darwin[8-9] because it slows down
+    # the linking phase. A possible bug in ld?
+    # on Darwin -single_module speeds up loading of the dynamic libraries.
+    extra_ldflags_libjava=-Wl,-single_module
+    ;;
+esac
+
+
+# Allow the GC to be disabled.  Can be useful when debugging.
+echo "$as_me:$LINENO: checking for garbage collector to use" >&5
+echo $ECHO_N "checking for garbage collector to use... $ECHO_C" >&6
+# Check whether --enable-java-gc or --disable-java-gc was given.
+if test "${enable_java_gc+set}" = set; then
+  enableval="$enable_java_gc"
+  GC=$enableval
+else
+  GC=boehm
+fi;
+GCLIBS=
+GCINCS=
+GCDEPS=
+GCSPEC=
+JC1GCSPEC=
+GCTESTSPEC=
+case "$GC" in
+ boehm)
+    echo "$as_me:$LINENO: result: boehm" >&5
+echo "${ECHO_T}boehm" >&6
+    GCLIBS=../boehm-gc/libgcjgc_convenience.la
+    JC1GCSPEC='-fuse-boehm-gc'
+    GCTESTSPEC="-L`${PWDCMD-pwd}`/../boehm-gc/.libs -rpath `${PWDCMD-pwd}`/../boehm-gc/.libs"
+    GCINCS='-I$(top_srcdir)/../boehm-gc/include -I../boehm-gc/include'
+    GCOBJS=boehm.lo
+    GCHDR=boehm-gc.h
+    # The POSIX thread support needs to know this.
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BOEHM_GC 1
+_ACEOF
+
+    ;;
+ no)
+    echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+    GCHDR=no-gc.h
+    ;;
+ *)
+    { { echo "$as_me:$LINENO: error: unrecognized collector \"$GC\"" >&5
+echo "$as_me: error: unrecognized collector \"$GC\"" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
+esac
+
+
+
+
+
+
+          ac_config_links="$ac_config_links include/java-gc.h:include/$GCHDR"
+
+
+
+if test "$GC" = boehm; then
+  USING_BOEHMGC_TRUE=
+  USING_BOEHMGC_FALSE='#'
+else
+  USING_BOEHMGC_TRUE='#'
+  USING_BOEHMGC_FALSE=
+fi
+
+
+
+if test "$GC" = no; then
+  USING_NOGC_TRUE=
+  USING_NOGC_FALSE='#'
+else
+  USING_NOGC_TRUE='#'
+  USING_NOGC_FALSE=
+fi
+
+
+
+echo "$as_me:$LINENO: checking for thread model used by GCC" >&5
+echo $ECHO_N "checking for thread model used by GCC... $ECHO_C" >&6
+THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
+echo "$as_me:$LINENO: result: $THREADS" >&5
+echo "${ECHO_T}$THREADS" >&6
+
+case "$THREADS" in
+ no | none | single)
+    THREADS=none
+    ;;
+ posix | posix95 | pthreads)
+    THREADS=posix
+    case "$host" in
+     *-*-linux*)
+
+cat >>confdefs.h <<\_ACEOF
+#define LINUX_THREADS 1
+_ACEOF
+
+	;;
+    esac
+    ;;
+ win32)
+    ;;
+ decosf1 | irix | mach | os2 | solaris | dce | vxworks)
+    { { echo "$as_me:$LINENO: error: thread package $THREADS not yet supported" >&5
+echo "$as_me: error: thread package $THREADS not yet supported" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
+ *)
+    { { echo "$as_me:$LINENO: error: $THREADS is an unknown thread package" >&5
+echo "$as_me: error: $THREADS is an unknown thread package" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
+esac
+
+THREADCXXFLAGS=
+THREADLDFLAGS=
+THREADLIBS=
+THREADINCS=
+THREADDEPS=
+THREADH=
+THREADSPEC=
+THREADSTARTFILESPEC=
+case "$THREADS" in
+ posix)
+    case "$host" in
+     *-*-cygwin*)
+	# Don't set THREADLIBS here.  Cygwin doesn't have -lpthread.
+	;;
+     *-*-freebsd[1234]*)
+	# Before FreeBSD 5, it didn't have -lpthread (or any library which
+	# merely adds pthread_* functions) but it does have a -pthread switch
+	# which is required at link-time to select -lc_r *instead* of -lc.
+	THREADLDFLAGS=-pthread
+	# Don't set THREADSPEC here as might be expected since -pthread is
+	# not processed when found within a spec file, it must come from
+	# the command line.  For now, the user must provide the -pthread
+	# switch to link code compiled with gcj.  In future, consider adding
+	# support for weak references to pthread_* functions ala gthr.h API.
+	THREADSPEC='%{!pthread: %{!shared: %eUnder this configuration, the user must provide -pthread when linking.}}'
+	;;
+     *-*-freebsd*)
+	# FreeBSD >=5.3 implements a model much closer to other modern UNIX
+	# systems which support threads and -lpthread.
+	THREADLDFLAGS=-pthread
+	THREADSPEC=-lpthread
+	;;
+     alpha*-dec-osf* | hppa*-hp-hpux*)
+	THREADCXXFLAGS=-pthread
+	# boehm-gc needs some functions from librt, so link that too.
+	THREADLIBS='-lpthread -lrt'
+	THREADSPEC='-lpthread -lrt'
+	;;
+     *)
+	THREADLIBS=-lpthread
+	THREADSPEC=-lpthread
+	;;
+    esac
+    THREADH=posix-threads.h
+    # MIT pthreads doesn't seem to have the mutexattr functions.
+    # But for now we don't check for it.  We just assume you aren't
+    # using MIT pthreads.
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PTHREAD_MUTEXATTR_INIT 1
+_ACEOF
+
+
+    # If we're using the Boehm GC, then we happen to know that it
+    # defines _REENTRANT, so we don't bother.  Eww.
+    if test "$GC" != boehm; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _REENTRANT 1
+_ACEOF
+
+    fi
+
+cat >>confdefs.h <<\_ACEOF
+#define _POSIX_PTHREAD_SEMANTICS 1
+_ACEOF
+
+    ;;
+
+ win32)
+    THREADH=win32-threads.h
+    THREADCXXFLAGS=-mthreads
+    # We need thread-safe exception handling so _CRT_MT should be set to 1.
+    # But we do not want the executables created to be dependent on
+    # mingwm10.dll which provides a __mingwthr_key_dtor() that cleans up
+    # exception handling contexts.  The following kludge achieves this effect
+    # and causes a dummy __mingwthr_key_dtor() to be linked in from
+    # libmingw32.a.  This causes a memory leak of about 24 bytes per thread.
+    # A workaround is to explicitly use -mthreads while linking Java programs.
+    # See PR libgcj/28263.
+    #
+    # FIXME: In Java we are able to detect thread death at the end of
+    # Thread.run() so we should be able to clean up the exception handling
+    # contexts ourselves.
+    THREADSTARTFILESPEC='crtmt%O%s'
+    ;;
+
+ none)
+    THREADH=no-threads.h
+    ;;
+esac
+          ac_config_links="$ac_config_links include/java-threads.h:include/$THREADH"
+
+
+
+
+
+
+
+
+
+
+if test "$THREADS" = posix; then
+  USING_POSIX_THREADS_TRUE=
+  USING_POSIX_THREADS_FALSE='#'
+else
+  USING_POSIX_THREADS_TRUE='#'
+  USING_POSIX_THREADS_FALSE=
+fi
+
+
+
+if test "$THREADS" = win32; then
+  USING_WIN32_THREADS_TRUE=
+  USING_WIN32_THREADS_FALSE='#'
+else
+  USING_WIN32_THREADS_TRUE='#'
+  USING_WIN32_THREADS_FALSE=
+fi
+
+
+
+if test "$THREADS" = none; then
+  USING_NO_THREADS_TRUE=
+  USING_NO_THREADS_FALSE='#'
+else
+  USING_NO_THREADS_TRUE='#'
+  USING_NO_THREADS_FALSE=
+fi
+
+
+
+if test "$use_libgcj_bc" = yes; then
+  USE_LIBGCJ_BC_TRUE=
+  USE_LIBGCJ_BC_FALSE='#'
+else
+  USE_LIBGCJ_BC_TRUE='#'
+  USE_LIBGCJ_BC_FALSE=
+fi
+
+
+if test -d sysdep; then true; else mkdir sysdep; fi
+          ac_config_links="$ac_config_links sysdep/locks.h:sysdep/$sysdeps_dir/locks.h"
+
+          ac_config_links="$ac_config_links sysdep/backtrace.h:$fallback_backtrace_h"
+
+          ac_config_links="$ac_config_links sysdep/descriptor.h:$descriptor_h"
+
+
+LIBGCJ_SPEC="%{s-bc-abi:} -lgcj"
+if test "$use_libgcj_bc" = yes; then
+  LIBGCJ_SPEC="%{s-bc-abi:-lgcj_bc;:-lgcj}"
+fi
+
+
+HASH_SYNC_SPEC=
+# Hash synchronization is only useful with posix threads right now.
+if test "$enable_hash_synchronization" = yes && test "$THREADS" != "none"; then
+   HASH_SYNC_SPEC=-fhash-synchronization
+
+cat >>confdefs.h <<\_ACEOF
+#define JV_HASH_SYNCHRONIZATION 1
+_ACEOF
+
+fi
+
+
+
+
+if test "$GCC" = yes; then
+  USING_GCC_TRUE=
+  USING_GCC_FALSE='#'
+else
+  USING_GCC_TRUE='#'
+  USING_GCC_FALSE=
+fi
+
+
+# We're in the tree with gcc, and need to include some of its headers.
+GCC_UNWIND_INCLUDE='-I$(multi_basedir)/./libjava/../gcc'
+
+if test "x${with_newlib}" = "xyes"; then
+   # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
+   # may not work correctly, because the compiler may not be able to
+   # link executables.
+
+   # We assume newlib.  This lets us hard-code the functions we know
+   # we'll have.
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MEMMOVE 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MEMCPY 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRERROR 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TIME 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GMTIME_R 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LOCALTIME_R 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_USLEEP_DECL 1
+_ACEOF
+
+   # This is only for POSIX threads.
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PTHREAD_MUTEXATTR_INIT 1
+_ACEOF
+
+   # We also assume we are using gcc, which provides alloca.
+   cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
+
+
+   # Assume we do not have getuid and friends.
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_GETUID 1
+_ACEOF
+
+   PLATFORMNET=NoNet
+else
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in strerror ioctl select fstat open fsync sleep opendir \
+                   gmtime_r localtime_r readdir_r getpwuid_r getcwd \
+		   access stat lstat mkdir rename rmdir unlink utime chmod readlink \
+		   nl_langinfo setlocale \
+		   inet_pton uname inet_ntoa \
+		   fork execvp getrlimit pipe sigaction ftruncate mmap \
+		   getifaddrs
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+for ac_func in inet_aton inet_addr
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ break
+fi
+done
+
+   echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+for ac_header in execinfo.h unistd.h dlfcn.h sys/resource.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ---------------------------------- ##
+## Report this to the libjava lists.  ##
+## ---------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+   # Do an additional check on dld, HP-UX for example has dladdr in libdld.sl
+   echo "$as_me:$LINENO: checking for dladdr in -ldl" >&5
+echo $ECHO_N "checking for dladdr in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dladdr+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dladdr ();
+int
+main ()
+{
+dladdr ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dladdr=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dladdr=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dladdr" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dladdr" >&6
+if test $ac_cv_lib_dl_dladdr = yes; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DLADDR 1
+_ACEOF
+
+else
+
+       echo "$as_me:$LINENO: checking for dladdr in -ldld" >&5
+echo $ECHO_N "checking for dladdr in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dladdr+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dladdr ();
+int
+main ()
+{
+dladdr ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_dladdr=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_dladdr=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dladdr" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dladdr" >&6
+if test $ac_cv_lib_dld_dladdr = yes; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DLADDR 1
+_ACEOF
+
+fi
+
+fi
+
+
+   if test x"$cross_compiling" = x"no"; then
+     echo "$as_me:$LINENO: checking for /proc/self/exe" >&5
+echo $ECHO_N "checking for /proc/self/exe... $ECHO_C" >&6
+if test "${ac_cv_file__proc_self_exe+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/proc/self/exe"; then
+  ac_cv_file__proc_self_exe=yes
+else
+  ac_cv_file__proc_self_exe=no
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_file__proc_self_exe" >&5
+echo "${ECHO_T}$ac_cv_file__proc_self_exe" >&6
+if test $ac_cv_file__proc_self_exe = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE__PROC_SELF_EXE 1
+_ACEOF
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PROC_SELF_EXE 1
+_ACEOF
+
+fi
+
+   else
+     case $host in
+     *-linux*)
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PROC_SELF_EXE 1
+_ACEOF
+
+       ;;
+     esac
+   fi
+
+
+      if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval="$with_gnu_ld"
+  test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi;
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  echo "$as_me:$LINENO: checking for ld used by GCC" >&5
+echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | [A-Za-z]:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${acl_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+	test "$with_gnu_ld" != no && break
+      else
+	test "$with_gnu_ld" != yes && break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${acl_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+  acl_cv_prog_gnu_ld=yes
+else
+  acl_cv_prog_gnu_ld=no
+fi
+fi
+echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+                                                echo "$as_me:$LINENO: checking for shared library run path origin" >&5
+echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
+if test "${acl_cv_rpath+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+
+fi
+echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
+echo "${ECHO_T}$acl_cv_rpath" >&6
+  wl="$acl_cv_wl"
+  libext="$acl_cv_libext"
+  shlibext="$acl_cv_shlibext"
+  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  hardcode_direct="$acl_cv_hardcode_direct"
+  hardcode_minus_L="$acl_cv_hardcode_minus_L"
+    # Check whether --enable-rpath or --disable-rpath was given.
+if test "${enable_rpath+set}" = set; then
+  enableval="$enable_rpath"
+  :
+else
+  enable_rpath=yes
+fi;
+
+
+
+
+
+
+
+    use_additional=yes
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/lib"
+      fi
+    fi
+
+fi;
+      LIBICONV=
+  LTLIBICONV=
+  INCICONV=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='iconv '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          if test $use_additional = yes; then
+            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+              found_dir="$additional_libdir"
+              found_so="$additional_libdir/lib$name.$shlibext"
+              if test -f "$additional_libdir/lib$name.la"; then
+                found_la="$additional_libdir/lib$name.la"
+              fi
+            else
+              if test -f "$additional_libdir/lib$name.$libext"; then
+                found_dir="$additional_libdir"
+                found_a="$additional_libdir/lib$name.$libext"
+                if test -f "$additional_libdir/lib$name.la"; then
+                  found_la="$additional_libdir/lib$name.la"
+                fi
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                    found_dir="$dir"
+                    found_so="$dir/lib$name.$shlibext"
+                    if test -f "$dir/lib$name.la"; then
+                      found_la="$dir/lib$name.la"
+                    fi
+                  else
+                    if test -f "$dir/lib$name.$libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/lib$name.$libext"
+                      if test -f "$dir/lib$name.la"; then
+                        found_la="$dir/lib$name.la"
+                      fi
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+              else
+                                                                                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$hardcode_direct" = yes; then
+                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                else
+                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                                haveit=
+                    for x in $LDFLAGS $LIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+                    fi
+                    if test "$hardcode_minus_L" != no; then
+                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                    else
+                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+              else
+                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */lib | */lib/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux*) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/lib"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/lib"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux*) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+    done
+  fi
+
+
+
+
+
+
+
+          am_save_CPPFLAGS="$CPPFLAGS"
+
+  for element in $INCICONV; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
+
+
+  echo "$as_me:$LINENO: checking for iconv" >&5
+echo $ECHO_N "checking for iconv... $ECHO_C" >&6
+if test "${am_cv_func_iconv+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  am_cv_func_iconv=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
+      if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+      LIBS="$am_save_LIBS"
+    fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
+echo "${ECHO_T}$am_cv_func_iconv" >&6
+  if test "$am_cv_func_iconv" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ICONV 1
+_ACEOF
+
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    echo "$as_me:$LINENO: checking how to link with libiconv" >&5
+echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
+    echo "$as_me:$LINENO: result: $LIBICONV" >&5
+echo "${ECHO_T}$LIBICONV" >&6
+  else
+            CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
+
+
+
+  if test "$am_cv_func_iconv" = yes; then
+    echo "$as_me:$LINENO: checking for iconv declaration" >&5
+echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
+    if test "${am_cv_proto_iconv+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  am_cv_proto_iconv_arg1=""
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_proto_iconv_arg1="const"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
+fi
+
+    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    echo "$as_me:$LINENO: result: ${ac_t:-
+         }$am_cv_proto_iconv" >&5
+echo "${ECHO_T}${ac_t:-
+         }$am_cv_proto_iconv" >&6
+
+cat >>confdefs.h <<_ACEOF
+#define ICONV_CONST $am_cv_proto_iconv_arg1
+_ACEOF
+
+  fi
+
+
+  echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
+echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
+if test "${am_cv_val_LC_MESSAGES+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <locale.h>
+int
+main ()
+{
+return LC_MESSAGES
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  am_cv_val_LC_MESSAGES=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
+echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
+  if test $am_cv_val_LC_MESSAGES = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LC_MESSAGES 1
+_ACEOF
+
+  fi
+
+   echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
+if test "${ac_cv_struct_tm+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm *tp; tp->tm_sec;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_struct_tm=time.h
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_struct_tm=sys/time.h
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+echo "${ECHO_T}$ac_cv_struct_tm" >&6
+if test $ac_cv_struct_tm = sys/time.h; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TM_IN_SYS_TIME 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
+echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
+if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (ac_aggr.tm_zone)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_tm_tm_zone=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (sizeof ac_aggr.tm_zone)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_tm_tm_zone=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_tm_tm_zone=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
+echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
+if test $ac_cv_member_struct_tm_tm_zone = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_TM_TM_ZONE 1
+_ACEOF
+
+
+fi
+
+if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TM_ZONE 1
+_ACEOF
+
+else
+  echo "$as_me:$LINENO: checking for tzname" >&5
+echo $ECHO_N "checking for tzname... $ECHO_C" >&6
+if test "${ac_cv_var_tzname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <time.h>
+#ifndef tzname /* For SGI.  */
+extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
+#endif
+
+int
+main ()
+{
+atoi(*tzname);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_var_tzname=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_var_tzname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
+echo "${ECHO_T}$ac_cv_var_tzname" >&6
+  if test $ac_cv_var_tzname = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TZNAME 1
+_ACEOF
+
+  fi
+fi
+
+
+
+
+for ac_func in gethostbyname_r
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETHOSTBYNAME_R 1
+_ACEOF
+
+     # There are two different kinds of gethostbyname_r.
+     # We look for the one that returns `int'.
+     # Hopefully this check is robust enough.
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <netdb.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "int.*gethostbyname_r" >/dev/null 2>&1; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define GETHOSTBYNAME_R_RETURNS_INT 1
+_ACEOF
+
+fi
+rm -f conftest*
+
+
+     case " $GCINCS " in
+     *" -D_REENTRANT "*) ;;
+     *)
+		echo "$as_me:$LINENO: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
+echo $ECHO_N "checking whether gethostbyname_r declaration requires -D_REENTRANT... $ECHO_C" >&6
+if test "${libjava_cv_gethostbyname_r_needs_reentrant+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+   ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+	  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <netdb.h>
+int
+main ()
+{
+gethostbyname_r("", 0, 0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  libjava_cv_gethostbyname_r_needs_reentrant=no
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+		CPPFLAGS_SAVE="$CPPFLAGS"
+		CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+		cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <netdb.h>
+int
+main ()
+{
+gethostbyname_r("", 0, 0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  libjava_cv_gethostbyname_r_needs_reentrant=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+libjava_cv_gethostbyname_r_needs_reentrant=fail
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+		CPPFLAGS="$CPPFLAGS_SAVE"
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+	  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+echo "$as_me:$LINENO: result: $libjava_cv_gethostbyname_r_needs_reentrant" >&5
+echo "${ECHO_T}$libjava_cv_gethostbyname_r_needs_reentrant" >&6
+	if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _REENTRANT 1
+_ACEOF
+
+	fi
+     ;;
+     esac
+
+     echo "$as_me:$LINENO: checking for struct hostent_data" >&5
+echo $ECHO_N "checking for struct hostent_data... $ECHO_C" >&6
+if test "${libjava_cv_struct_hostent_data+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
+# define _REENTRANT 1
+#endif
+#include <netdb.h>
+int
+main ()
+{
+struct hostent_data data;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  libjava_cv_struct_hostent_data=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+libjava_cv_struct_hostent_data=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $libjava_cv_struct_hostent_data" >&5
+echo "${ECHO_T}$libjava_cv_struct_hostent_data" >&6
+     if test "x$libjava_cv_struct_hostent_data" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_HOSTENT_DATA 1
+_ACEOF
+
+     fi
+
+fi
+done
+
+
+   # FIXME: libjava source code expects to find a prototype for
+   # gethostbyaddr_r in netdb.h.  The outer check ensures that
+   # HAVE_GETHOSTBYADDR_R will not be defined if the prototype fails
+   # to exist where expected.  (The root issue: AC_CHECK_FUNCS assumes C
+   # linkage check is enough, yet C++ code requires proper prototypes.)
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <netdb.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "gethostbyaddr_r" >/dev/null 2>&1; then
+
+
+for ac_func in gethostbyaddr_r
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETHOSTBYADDR_R 1
+_ACEOF
+
+     # There are two different kinds of gethostbyaddr_r.
+     # We look for the one that returns `int'.
+     # Hopefully this check is robust enough.
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <netdb.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "int.*gethostbyaddr_r" >/dev/null 2>&1; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define GETHOSTBYADDR_R_RETURNS_INT 1
+_ACEOF
+
+fi
+rm -f conftest*
+
+fi
+done
+
+fi
+rm -f conftest*
+
+
+
+for ac_func in gethostname
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETHOSTNAME 1
+_ACEOF
+
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <unistd.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "gethostname" >/dev/null 2>&1; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETHOSTNAME_DECL 1
+_ACEOF
+
+fi
+rm -f conftest*
+
+fi
+done
+
+
+
+for ac_func in usleep
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <unistd.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "usleep" >/dev/null 2>&1; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_USLEEP_DECL 1
+_ACEOF
+
+fi
+rm -f conftest*
+
+fi
+done
+
+
+   # Look for these functions in the thread library, but only bother
+   # if using POSIX threads.
+   if test "$THREADS" = posix; then
+      save_LIBS="$LIBS"
+      LIBS="$LIBS $THREADLIBS"
+      # Some POSIX thread systems don't have pthread_mutexattr_settype.
+      # E.g., Solaris.
+
+
+for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+      # Look for sched_yield.  Up to Solaris 2.6, it is in libposix4, since
+      # Solaris 7 the name librt is preferred.
+
+for ac_func in sched_yield
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+
+	echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5
+echo $ECHO_N "checking for sched_yield in -lrt... $ECHO_C" >&6
+if test "${ac_cv_lib_rt_sched_yield+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char sched_yield ();
+int
+main ()
+{
+sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_rt_sched_yield=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_rt_sched_yield=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5
+echo "${ECHO_T}$ac_cv_lib_rt_sched_yield" >&6
+if test $ac_cv_lib_rt_sched_yield = yes; then
+
+	  cat >>confdefs.h <<\_ACEOF
+#define HAVE_SCHED_YIELD 1
+_ACEOF
+
+	  THREADLIBS="$THREADLIBS -lrt"
+	  THREADSPEC="$THREADSPEC -lrt"
+else
+
+	  echo "$as_me:$LINENO: checking for sched_yield in -lposix4" >&5
+echo $ECHO_N "checking for sched_yield in -lposix4... $ECHO_C" >&6
+if test "${ac_cv_lib_posix4_sched_yield+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix4  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char sched_yield ();
+int
+main ()
+{
+sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_posix4_sched_yield=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_posix4_sched_yield=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_posix4_sched_yield" >&5
+echo "${ECHO_T}$ac_cv_lib_posix4_sched_yield" >&6
+if test $ac_cv_lib_posix4_sched_yield = yes; then
+
+	    cat >>confdefs.h <<\_ACEOF
+#define HAVE_SCHED_YIELD 1
+_ACEOF
+
+	    THREADLIBS="$THREADLIBS -lposix4"
+	    THREADSPEC="$THREADSPEC -lposix4"
+fi
+
+fi
+
+fi
+done
+
+
+      echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5
+echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
+if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char clock_gettime ();
+int
+main ()
+{
+clock_gettime ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_rt_clock_gettime=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_rt_clock_gettime=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5
+echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
+if test $ac_cv_lib_rt_clock_gettime = yes; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CLOCK_GETTIME 1
+_ACEOF
+
+	 case "$THREADSPEC" in
+	   *-lrt*) ;;
+	   *)
+ 	     THREADSPEC="$THREADSPEC -lrt"
+	     THREADLIBS="$THREADLIBS -lrt"
+	     ;;
+	 esac
+fi
+
+
+      LIBS="$save_LIBS"
+
+      # We can save a little space at runtime if the mutex has m_count
+      # or __m_count.  This is a nice hack for Linux.
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+
+          extern pthread_mutex_t *mutex; int q = mutex->m_count;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+cat >>confdefs.h <<\_ACEOF
+#define PTHREAD_MUTEX_HAVE_M_COUNT 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+
+	    extern pthread_mutex_t *mutex; int q = mutex->__m_count;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+cat >>confdefs.h <<\_ACEOF
+#define PTHREAD_MUTEX_HAVE___M_COUNT 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+   fi
+
+   # We require a way to get the time.
+   time_found=no
+
+
+
+for ac_func in gettimeofday time ftime
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ time_found=yes
+fi
+done
+
+   if test "$time_found" = no; then
+      { { echo "$as_me:$LINENO: error: no function found to get the time" >&5
+echo "$as_me: error: no function found to get the time" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+
+for ac_func in memmove
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+   # We require memcpy.
+   memcpy_found=no
+
+for ac_func in memcpy
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ memcpy_found=yes
+fi
+done
+
+   if test "$memcpy_found" = no; then
+      { { echo "$as_me:$LINENO: error: memcpy is required" >&5
+echo "$as_me: error: memcpy is required" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+   # Do an additional check on dld, HP-UX for example has dlopen in libdld.sl
+   echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DLOPEN 1
+_ACEOF
+
+else
+
+       echo "$as_me:$LINENO: checking for dlopen in -ldld" >&5
+echo $ECHO_N "checking for dlopen in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dlopen" >&6
+if test $ac_cv_lib_dld_dlopen = yes; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DLOPEN 1
+_ACEOF
+
+fi
+
+fi
+
+
+   # Some library-finding code we stole from Tcl.
+   #--------------------------------------------------------------------
+   #	Check for the existence of the -lsocket and -lnsl libraries.
+   #	The order here is important, so that they end up in the right
+   #	order in the command line generated by make.  Here are some
+   #	special considerations:
+   #	1. Use "connect" and "accept" to check for -lsocket, and
+   #	   "gethostbyname" to check for -lnsl.
+   #	2. Use each function name only once:  can't redo a check because
+   #	   autoconf caches the results of the last check and won't redo it.
+   #	3. Use -lnsl and -lsocket only if they supply procedures that
+   #	   aren't already present in the normal libraries.  This is because
+   #	   IRIX 5.2 has libraries, but they aren't needed and they're
+   #	   bogus:  they goof up name resolution if used.
+   #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
+   #	   To get around this problem, check for both libraries together
+   #	   if -lsocket doesn't work by itself.
+   #--------------------------------------------------------------------
+
+   echo "$as_me:$LINENO: checking for socket libraries" >&5
+echo $ECHO_N "checking for socket libraries... $ECHO_C" >&6
+if test "${gcj_cv_lib_sockets+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gcj_cv_lib_sockets=
+     gcj_checkBoth=0
+     unset ac_cv_func_connect
+     echo "$as_me:$LINENO: checking for connect" >&5
+echo $ECHO_N "checking for connect... $ECHO_C" >&6
+if test "${ac_cv_func_connect+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define connect to an innocuous variant, in case <limits.h> declares connect.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define connect innocuous_connect
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char connect (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef connect
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char connect ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_connect) || defined (__stub___connect)
+choke me
+#else
+char (*f) () = connect;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != connect;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_connect=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_connect=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
+echo "${ECHO_T}$ac_cv_func_connect" >&6
+if test $ac_cv_func_connect = yes; then
+  gcj_checkSocket=0
+else
+  gcj_checkSocket=1
+fi
+
+     if test "$gcj_checkSocket" = 1; then
+	 unset ac_cv_func_connect
+	 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
+echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_socket_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
+if test $ac_cv_lib_socket_main = yes; then
+  gcj_cv_lib_sockets="-lsocket"
+else
+  gcj_checkBoth=1
+fi
+
+     fi
+     if test "$gcj_checkBoth" = 1; then
+	 gcj_oldLibs=$LIBS
+	 LIBS="$LIBS -lsocket -lnsl"
+	 unset ac_cv_func_accept
+	 echo "$as_me:$LINENO: checking for accept" >&5
+echo $ECHO_N "checking for accept... $ECHO_C" >&6
+if test "${ac_cv_func_accept+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define accept to an innocuous variant, in case <limits.h> declares accept.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define accept innocuous_accept
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char accept (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef accept
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char accept ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_accept) || defined (__stub___accept)
+choke me
+#else
+char (*f) () = accept;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != accept;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_accept=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_accept=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
+echo "${ECHO_T}$ac_cv_func_accept" >&6
+if test $ac_cv_func_accept = yes; then
+  gcj_checkNsl=0
+			gcj_cv_lib_sockets="-lsocket -lnsl"
+fi
+
+	 unset ac_cv_func_accept
+	 LIBS=$gcj_oldLibs
+     fi
+     unset ac_cv_func_gethostbyname
+     gcj_oldLibs=$LIBS
+     LIBS="$LIBS $gcj_cv_lib_sockets"
+     echo "$as_me:$LINENO: checking for gethostbyname" >&5
+echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
+if test "${ac_cv_func_gethostbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define gethostbyname innocuous_gethostbyname
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char gethostbyname (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef gethostbyname
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char gethostbyname ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+char (*f) () = gethostbyname;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != gethostbyname;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_gethostbyname=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
+if test $ac_cv_func_gethostbyname = yes; then
+  :
+else
+  echo "$as_me:$LINENO: checking for main in -lnsl" >&5
+echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_nsl_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
+if test $ac_cv_lib_nsl_main = yes; then
+  gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
+fi
+
+fi
+
+     unset ac_cv_func_gethostbyname
+     LIBS=$gcj_oldLIBS
+
+fi
+echo "$as_me:$LINENO: result: $gcj_cv_lib_sockets" >&5
+echo "${ECHO_T}$gcj_cv_lib_sockets" >&6
+   SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
+
+   if test "$with_system_zlib" = yes; then
+      echo "$as_me:$LINENO: checking for deflate in -lz" >&5
+echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6
+if test "${ac_cv_lib_z_deflate+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char deflate ();
+int
+main ()
+{
+deflate ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_z_deflate=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_z_deflate=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
+echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6
+if test $ac_cv_lib_z_deflate = yes; then
+  ZLIBSPEC=-lz
+else
+  ZLIBSPEC=
+fi
+
+   fi
+
+   # Test for Gtk stuff, if asked for.
+   if test "$use_gtk_awt" = yes; then
+
+  succeeded=no
+
+  if test -z "$PKG_CONFIG"; then
+    # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  fi
+
+  if test "$PKG_CONFIG" = "no" ; then
+     echo "*** The pkg-config script could not be found. Make sure it is"
+     echo "*** in your path, or set the PKG_CONFIG environment variable"
+     echo "*** to the full path to pkg-config."
+     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4" >&5
+echo $ECHO_N "checking for gtk+-2.0 >= 2.4... $ECHO_C" >&6
+
+        if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4" ; then
+            echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+            succeeded=yes
+
+            echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
+echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
+            GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4"`
+            echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
+echo "${ECHO_T}$GTK_CFLAGS" >&6
+
+            echo "$as_me:$LINENO: checking GTK_LIBS" >&5
+echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
+            GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4"`
+            echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
+echo "${ECHO_T}$GTK_LIBS" >&6
+        else
+            GTK_CFLAGS=""
+            GTK_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but
+            ## do set a variable so people can do so.
+            GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4"`
+            echo $GTK_PKG_ERRORS
+        fi
+
+
+
+     else
+        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig"
+     fi
+  fi
+
+  if test $succeeded = yes; then
+     :
+  else
+     { { echo "$as_me:$LINENO: error: Library requirements (gtk+-2.0 >= 2.4) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
+echo "$as_me: error: Library requirements (gtk+-2.0 >= 2.4) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+
+
+
+
+
+  succeeded=no
+
+  if test -z "$PKG_CONFIG"; then
+    # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  fi
+
+  if test "$PKG_CONFIG" = "no" ; then
+     echo "*** The pkg-config script could not be found. Make sure it is"
+     echo "*** in your path, or set the PKG_CONFIG environment variable"
+     echo "*** to the full path to pkg-config."
+     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        echo "$as_me:$LINENO: checking for glib-2.0 >= 2.4 gthread-2.0 >= 2.4" >&5
+echo $ECHO_N "checking for glib-2.0 >= 2.4 gthread-2.0 >= 2.4... $ECHO_C" >&6
+
+        if $PKG_CONFIG --exists "glib-2.0 >= 2.4 gthread-2.0 >= 2.4" ; then
+            echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+            succeeded=yes
+
+            echo "$as_me:$LINENO: checking GLIB_CFLAGS" >&5
+echo $ECHO_N "checking GLIB_CFLAGS... $ECHO_C" >&6
+            GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.4 gthread-2.0 >= 2.4"`
+            echo "$as_me:$LINENO: result: $GLIB_CFLAGS" >&5
+echo "${ECHO_T}$GLIB_CFLAGS" >&6
+
+            echo "$as_me:$LINENO: checking GLIB_LIBS" >&5
+echo $ECHO_N "checking GLIB_LIBS... $ECHO_C" >&6
+            GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.4 gthread-2.0 >= 2.4"`
+            echo "$as_me:$LINENO: result: $GLIB_LIBS" >&5
+echo "${ECHO_T}$GLIB_LIBS" >&6
+        else
+            GLIB_CFLAGS=""
+            GLIB_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but
+            ## do set a variable so people can do so.
+            GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.4 gthread-2.0 >= 2.4"`
+            echo $GLIB_PKG_ERRORS
+        fi
+
+
+
+     else
+        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig"
+     fi
+  fi
+
+  if test $succeeded = yes; then
+     :
+  else
+     { { echo "$as_me:$LINENO: error: Library requirements (glib-2.0 >= 2.4 gthread-2.0 >= 2.4) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
+echo "$as_me: error: Library requirements (glib-2.0 >= 2.4 gthread-2.0 >= 2.4) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+
+
+
+
+
+  succeeded=no
+
+  if test -z "$PKG_CONFIG"; then
+    # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  fi
+
+  if test "$PKG_CONFIG" = "no" ; then
+     echo "*** The pkg-config script could not be found. Make sure it is"
+     echo "*** in your path, or set the PKG_CONFIG environment variable"
+     echo "*** to the full path to pkg-config."
+     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        echo "$as_me:$LINENO: checking for libart-2.0 >= 2.1" >&5
+echo $ECHO_N "checking for libart-2.0 >= 2.1... $ECHO_C" >&6
+
+        if $PKG_CONFIG --exists "libart-2.0 >= 2.1" ; then
+            echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+            succeeded=yes
+
+            echo "$as_me:$LINENO: checking LIBART_CFLAGS" >&5
+echo $ECHO_N "checking LIBART_CFLAGS... $ECHO_C" >&6
+            LIBART_CFLAGS=`$PKG_CONFIG --cflags "libart-2.0 >= 2.1"`
+            echo "$as_me:$LINENO: result: $LIBART_CFLAGS" >&5
+echo "${ECHO_T}$LIBART_CFLAGS" >&6
+
+            echo "$as_me:$LINENO: checking LIBART_LIBS" >&5
+echo $ECHO_N "checking LIBART_LIBS... $ECHO_C" >&6
+            LIBART_LIBS=`$PKG_CONFIG --libs "libart-2.0 >= 2.1"`
+            echo "$as_me:$LINENO: result: $LIBART_LIBS" >&5
+echo "${ECHO_T}$LIBART_LIBS" >&6
+        else
+            LIBART_CFLAGS=""
+            LIBART_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but
+            ## do set a variable so people can do so.
+            LIBART_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libart-2.0 >= 2.1"`
+            echo $LIBART_PKG_ERRORS
+        fi
+
+
+
+     else
+        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig"
+     fi
+  fi
+
+  if test $succeeded = yes; then
+     :
+  else
+     { { echo "$as_me:$LINENO: error: Library requirements (libart-2.0 >= 2.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
+echo "$as_me: error: Library requirements (libart-2.0 >= 2.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+
+
+
+
+      # We require the XTest Extension to support java.awt.Robot.
+      echo "$as_me:$LINENO: checking for XTestQueryExtension in -lXtst" >&5
+echo $ECHO_N "checking for XTestQueryExtension in -lXtst... $ECHO_C" >&6
+if test "${ac_cv_lib_Xtst_XTestQueryExtension+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXtst ${X_LIBS} $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char XTestQueryExtension ();
+int
+main ()
+{
+XTestQueryExtension ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_Xtst_XTestQueryExtension=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_Xtst_XTestQueryExtension=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_Xtst_XTestQueryExtension" >&5
+echo "${ECHO_T}$ac_cv_lib_Xtst_XTestQueryExtension" >&6
+if test $ac_cv_lib_Xtst_XTestQueryExtension = yes; then
+  true
+else
+  { { echo "$as_me:$LINENO: error: libXtst not found, required by java.awt.Robot" >&5
+echo "$as_me: error: libXtst not found, required by java.awt.Robot" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+   fi
+
+   # On Solaris, and maybe other architectures, the Boehm collector
+   # requires -ldl.
+   if test "$GC" = boehm; then
+      echo "$as_me:$LINENO: checking for main in -ldl" >&5
+echo $ECHO_N "checking for main in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_main" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_main" >&6
+if test $ac_cv_lib_dl_main = yes; then
+  SYSTEMSPEC="$SYSTEMSPEC -ldl"
+fi
+
+   fi
+fi
+
+# Use a semicolon as CLASSPATH separator for MinGW, otherwise a colon.
+case $build in
+    *-mingw32) CLASSPATH_SEPARATOR=';' ;;
+    *)         CLASSPATH_SEPARATOR=':' ;;
+esac
+
+
+# We must search the source tree for java.lang, since we still don't
+# have libgcj.jar nor java/lang/*.class
+GCJ_SAVE_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS -I`${PWDCMD-pwd}` -I`cd $srcdir && ${PWDCMD-pwd}`"
+
+# Since some classes depend on this one, we need its source available
+# before we can do any GCJ compilation test :-(
+if test ! -f gnu/classpath/Configuration.java; then
+  test -d gnu || mkdir gnu
+  test -d gnu/classpath || mkdir gnu/classpath
+  # Note that it is not crucial that all the values here be correct.
+  sed -e "s, at prefix@,$prefix," \
+      -e "s, at VERSION@,$VERSION," \
+      -e "s, at LIBDEBUG@,false," \
+      -e "s, at INIT_LOAD_LIBRARY@,false," \
+      -e "s,@@,$LIBGCJDEBUG," \
+      -e "s, at default_toolkit@,$TOOLKIT," \
+      -e "s, at JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@,false," \
+      -e "s, at GTK_CAIRO_ENABLED@,false," \
+	< $srcdir/classpath/gnu/classpath/Configuration.java.in \
+	> gnu/classpath/Configuration.java
+  # We do not want to redirect the output of the grep below to /dev/null,
+  # but we add /dev/null to the input list so that grep will print the
+  # filename of Configuration.java in case it finds any matches.
+  if grep '@.*@' gnu/classpath/Configuration.java /dev/null; then
+    { { echo "$as_me:$LINENO: error: configure.ac is missing the substitutions above" >&5
+echo "$as_me: error: configure.ac is missing the substitutions above" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcj; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$GCJ"; then
+  ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_GCJ="${ac_tool_prefix}gcj"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+GCJ=$ac_cv_prog_GCJ
+if test -n "$GCJ"; then
+  echo "$as_me:$LINENO: result: $GCJ" >&5
+echo "${ECHO_T}$GCJ" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_GCJ"; then
+  ac_ct_GCJ=$GCJ
+  # Extract the first word of "gcj", so it can be a program name with args.
+set dummy gcj; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_GCJ"; then
+  ac_cv_prog_ac_ct_GCJ="$ac_ct_GCJ" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_GCJ="gcj"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_GCJ" && ac_cv_prog_ac_ct_GCJ="no"
+fi
+fi
+ac_ct_GCJ=$ac_cv_prog_ac_ct_GCJ
+if test -n "$ac_ct_GCJ"; then
+  echo "$as_me:$LINENO: result: $ac_ct_GCJ" >&5
+echo "${ECHO_T}$ac_ct_GCJ" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  GCJ=$ac_ct_GCJ
+else
+  GCJ="$ac_cv_prog_GCJ"
+fi
+
+  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+
+
+
+
+# Now remove it.
+rm -f gnu/classpath/Configuration.java
+
+CPPFLAGS=$GCJ_SAVE_CPPFLAGS
+
+echo "$as_me:$LINENO: checking for void *" >&5
+echo $ECHO_N "checking for void *... $ECHO_C" >&6
+if test "${ac_cv_type_void_p+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((void * *) 0)
+  return 0;
+if (sizeof (void *))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_void_p=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_void_p=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
+echo "${ECHO_T}$ac_cv_type_void_p" >&6
+
+echo "$as_me:$LINENO: checking size of void *" >&5
+echo $ECHO_N "checking size of void *... $ECHO_C" >&6
+if test "${ac_cv_sizeof_void_p+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_void_p" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+		    if test $ac_lo -le $ac_mid; then
+		      ac_lo= ac_hi=
+		      break
+		    fi
+		    ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+		       if test $ac_mid -le $ac_hi; then
+			 ac_lo= ac_hi=
+			 break
+		       fi
+		       ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_void_p=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (void *), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+long longval () { return (long) (sizeof (void *)); }
+unsigned long ulongval () { return (long) (sizeof (void *)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (void *))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (void *))))
+	exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (void *))))
+	exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_void_p=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (void *), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_void_p=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
+echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+_ACEOF
+
+
+
+echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_bigendian=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+  # try to guess the endianness by grepping values into an object file
+  ac_cv_c_bigendian=unknown
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+  ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+  if test "$ac_cv_c_bigendian" = unknown; then
+    ac_cv_c_bigendian=no
+  else
+    # finding both strings is unlikely to happen, but who knows?
+    ac_cv_c_bigendian=unknown
+  fi
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+int
+main ()
+{
+  /* Are we little or big endian?  From Harbison&Steele.  */
+  union
+  {
+    long l;
+    char c[sizeof (long)];
+  } u;
+  u.l = 1;
+  exit (u.c[sizeof (long) - 1] == 1);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_bigendian=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+case $ac_cv_c_bigendian in
+  yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+  no)
+     ;;
+  *)
+    { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+
+
+ZLIBS=
+SYS_ZLIBS=
+ZINCS=
+
+if test -z "$ZLIBSPEC"; then
+   # Use zlib from the GCC tree.
+   ZINCS='-I$(top_srcdir)/../zlib'
+   ZLIBS=../zlib/libzgcj_convenience.la
+else
+   # System's zlib.
+   SYS_ZLIBS="$ZLIBSPEC"
+fi
+
+
+
+
+
+
+
+
+
+
+
+if test "$NATIVE" = yes; then
+  NATIVE_TRUE=
+  NATIVE_FALSE='#'
+else
+  NATIVE_TRUE='#'
+  NATIVE_FALSE=
+fi
+
+
+
+if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then
+  NEEDS_DATA_START_TRUE=
+  NEEDS_DATA_START_FALSE='#'
+else
+  NEEDS_DATA_START_TRUE='#'
+  NEEDS_DATA_START_FALSE=
+fi
+
+
+
+# Process the option "--enable-version-specific-runtime-libs"
+# Calculate toolexeclibdir
+case ${version_specific_libs} in
+  yes)
+    # Need the gcc compiler version to know where to install libraries
+    # and header files if --enable-version-specific-runtime-libs option
+    # is selected.
+    includedir='$(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include/'
+    toolexecdir='$(libdir)/gcc/$(target_noncanonical)'
+    toolexecmainlibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
+    toolexeclibdir=$toolexecmainlibdir
+    ;;
+  no)
+    if test -n "$with_cross_host" &&
+       test x"$with_cross_host" != x"no"; then
+      # Install a library built with a cross compiler in tooldir, not libdir.
+      toolexecdir='$(exec_prefix)/$(target_noncanonical)'
+      toolexecmainlibdir='$(toolexecdir)/lib'
+    else
+      toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
+      toolexecmainlibdir='$(libdir)'
+    fi
+    multi_os_directory=`$CC -print-multi-os-directory`
+    case $multi_os_directory in
+      .) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /.
+      *) toolexeclibdir=$toolexecmainlibdir/$multi_os_directory ;;
+    esac
+    ;;
+esac
+
+
+
+
+# Determine where the standard .db file and GNU Classpath JNI
+# libraries are found.
+multi_os_directory=`$CC -print-multi-os-directory`
+case $multi_os_directory in
+  .)
+   dbexecdir='$(libdir)/gcj-$(gcc_version)' # Avoid /.
+   ;;
+  *)
+   dbexecdir='$(libdir)/'$multi_os_directory'/gcj-$(gcc_version)'
+   ;;
+esac
+
+
+# Determine gcj version number.
+gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`
+GCJVERSION=$gcjversion
+
+
+cat >>confdefs.h <<_ACEOF
+#define GCJVERSION "$GCJVERSION"
+_ACEOF
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define JV_VERSION "1.4.2"
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define JV_API_VERSION "1.4"
+_ACEOF
+
+
+
+case "${with_gxx_include_dir}" in
+  yes)
+    { { echo "$as_me:$LINENO: error: --with-gxx-include-dir=[dir] requires a directory" >&5
+echo "$as_me: error: --with-gxx-include-dir=[dir] requires a directory" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
+  no | "")
+    case "${enable_version_specific_runtime_libs}" in
+      yes) gxx_include_dir='$(libsubdir)/include/c++' ;;
+      *)
+	libstdcxx_incdir='c++/$(gcc_version)'
+	gxx_include_dir='include/$(libstdcxx_incdir)'
+	if test -n "$with_cross_host" &&
+           test x"$with_cross_host" != x"no"; then
+          gxx_include_dir='${prefix}/${target_alias}/'"$gxx_include_dir"
+        else
+          gxx_include_dir='${prefix}/'"$gxx_include_dir"
+        fi;;
+    esac ;;
+  *) gxx_include_dir=${with_gxx_include_dir} ;;
+esac
+
+
+
+
+# We check for sys/filio.h because Solaris 2.5 defines FIONREAD there.
+# On that system, sys/ioctl.h will not include sys/filio.h unless
+# BSD_COMP is defined; just including sys/filio.h is simpler.
+# We avoid AC_HEADER_DIRENT since we really only care about dirent.h
+# for now.  If you change this, you also must update natFile.cc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in unistd.h bstring.h sys/time.h sys/types.h fcntl.h \
+		  sys/ioctl.h sys/filio.h sys/stat.h sys/select.h \
+		  sys/socket.h netinet/in.h arpa/inet.h netdb.h net/if.h \
+		  pwd.h sys/config.h stdint.h langinfo.h locale.h \
+		  dirent.h sys/rw_lock.h ifaddrs.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ---------------------------------- ##
+## Report this to the libjava lists.  ##
+## ---------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in inttypes.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ---------------------------------- ##
+## Report this to the libjava lists.  ##
+## ---------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INTTYPES_H 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define JV_HAVE_INTTYPES_H 1
+_ACEOF
+
+
+fi
+
+done
+
+echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+
+int
+main ()
+{
+  int s;
+  wait (&s);
+  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_sys_wait_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_sys_wait_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
+if test $ac_cv_header_sys_wait_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_WAIT_H 1
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking for ssize_t" >&5
+echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
+if test "${ac_cv_type_ssize_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((ssize_t *) 0)
+  return 0;
+if (sizeof (ssize_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_ssize_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_ssize_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
+echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
+if test $ac_cv_type_ssize_t = yes; then
+  :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define ssize_t int
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking for in_addr_t" >&5
+echo $ECHO_N "checking for in_addr_t... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+int
+main ()
+{
+in_addr_t foo;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IN_ADDR_T 1
+_ACEOF
+
+   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+echo "$as_me:$LINENO: checking whether struct ip_mreq is in netinet/in.h" >&5
+echo $ECHO_N "checking whether struct ip_mreq is in netinet/in.h... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <netinet/in.h>
+int
+main ()
+{
+struct ip_mreq mreq;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_IP_MREQ 1
+_ACEOF
+
+   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+echo "$as_me:$LINENO: checking whether struct ipv6_mreq is in netinet/in.h" >&5
+echo $ECHO_N "checking whether struct ipv6_mreq is in netinet/in.h... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <netinet/in.h>
+int
+main ()
+{
+struct ipv6_mreq mreq6;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_IPV6_MREQ 1
+_ACEOF
+
+   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+echo "$as_me:$LINENO: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
+echo $ECHO_N "checking whether struct sockaddr_in6 is in netinet/in.h... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <netinet/in.h>
+int
+main ()
+{
+struct sockaddr_in6 addr6;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INET6 1
+_ACEOF
+
+   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+echo "$as_me:$LINENO: checking for socklen_t in sys/socket.h" >&5
+echo $ECHO_N "checking for socklen_t in sys/socket.h... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#define _POSIX_PII_SOCKET
+#include <sys/types.h>
+#include <sys/socket.h>
+int
+main ()
+{
+socklen_t x = 5;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SOCKLEN_T 1
+_ACEOF
+
+   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+echo "$as_me:$LINENO: checking for tm_gmtoff in struct tm" >&5
+echo $ECHO_N "checking for tm_gmtoff in struct tm... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <time.h>
+int
+main ()
+{
+struct tm tim; tim.tm_gmtoff = 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STRUCT_TM_HAS_GMTOFF 1
+_ACEOF
+
+   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+   echo "$as_me:$LINENO: checking for global timezone variable" >&5
+echo $ECHO_N "checking for global timezone variable... $ECHO_C" >&6
+               cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <time.h>
+int
+main ()
+{
+void i(){long z2 = 2*timezone;}
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TIMEZONE 1
+_ACEOF
+
+      echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       echo "$as_me:$LINENO: checking for global _timezone variable" >&5
+echo $ECHO_N "checking for global _timezone variable... $ECHO_C" >&6
+              cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <time.h>
+int
+main ()
+{
+long z2 = _timezone;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UNDERSCORE_TIMEZONE 1
+_ACEOF
+
+          echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments.  Useless!
+echo "$as_me:$LINENO: checking for working alloca.h" >&5
+echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
+if test "${ac_cv_working_alloca_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_working_alloca_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_working_alloca_h=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
+echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
+if test $ac_cv_working_alloca_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA_H 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for alloca" >&5
+echo $ECHO_N "checking for alloca... $ECHO_C" >&6
+if test "${ac_cv_func_alloca_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  if HAVE_ALLOCA_H
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_alloca_works=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_alloca_works=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
+echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
+
+if test $ac_cv_func_alloca_works = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
+
+else
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble.  Some versions do not even contain alloca or
+# contain a buggy version.  If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=alloca.$ac_objext
+
+cat >>confdefs.h <<\_ACEOF
+#define C_ALLOCA 1
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
+echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
+if test "${ac_cv_os_cray+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "webecray" >/dev/null 2>&1; then
+  ac_cv_os_cray=yes
+else
+  ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
+echo "${ECHO_T}$ac_cv_os_cray" >&6
+if test $ac_cv_os_cray = yes; then
+  for ac_func in _getb67 GETB67 getb67; do
+    as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+    break
+fi
+
+  done
+fi
+
+echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
+echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
+if test "${ac_cv_c_stack_direction+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_c_stack_direction=0
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+int
+find_stack_direction ()
+{
+  static char *addr = 0;
+  auto char dummy;
+  if (addr == 0)
+    {
+      addr = &dummy;
+      return find_stack_direction ();
+    }
+  else
+    return (&dummy > addr) ? 1 : -1;
+}
+
+int
+main ()
+{
+  exit (find_stack_direction () < 0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_stack_direction=1
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_stack_direction=-1
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
+echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
+
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+
+for ac_prog in perl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_PERL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$PERL"; then
+  ac_cv_prog_PERL="$PERL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_PERL="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+PERL=$ac_cv_prog_PERL
+if test -n "$PERL"; then
+  echo "$as_me:$LINENO: result: $PERL" >&5
+echo "${ECHO_T}$PERL" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$PERL" && break
+done
+test -n "$PERL" || PERL="false"
+
+
+SYSDEP_SOURCES=
+SIGNAL_HANDLER_AUX=
+
+case "${host}" in
+ i?86-*-linux*)
+    SIGNAL_HANDLER=include/i386-signal.h
+    ;;
+ sparc*-sun-solaris*)
+    SIGNAL_HANDLER=include/sparc-signal.h
+    ;;
+# ia64-*)
+#    SYSDEP_SOURCES=sysdep/ia64.c
+#    test -d sysdep || mkdir sysdep
+#    ;;
+ hppa*-*-linux*)
+    SIGNAL_HANDLER=include/pa-signal.h
+    ;;
+ hppa*-hp-hpux*)
+    SIGNAL_HANDLER=include/hppa-signal.h
+    ;;
+ ia64-*-linux*)
+    SIGNAL_HANDLER=include/dwarf2-signal.h
+    ;;
+ powerpc*-*-linux*)
+    SIGNAL_HANDLER=include/powerpc-signal.h
+    ;;
+ alpha*-*-linux*)
+    SIGNAL_HANDLER=include/dwarf2-signal.h
+    ;;
+ s390*-*-linux*)
+    SIGNAL_HANDLER=include/s390-signal.h
+    ;;
+ x86_64*-*-linux*)
+    SIGNAL_HANDLER=include/x86_64-signal.h
+    SIGNAL_HANDLER_AUX=include/i386-signal.h
+    ;;
+ sparc*-*-linux*)
+    SIGNAL_HANDLER=include/dwarf2-signal.h
+    ;;
+ sh*-*-linux*)
+    SIGNAL_HANDLER=include/sh-signal.h
+    ;;
+ *mingw*)
+    SIGNAL_HANDLER=include/win32-signal.h
+    ;;
+ mips*-*-linux*)
+    SIGNAL_HANDLER=include/mips-signal.h
+    ;;
+ powerpc*-*-darwin*)
+    SIGNAL_HANDLER=include/darwin-signal.h
+    ;;
+ *)
+    SIGNAL_HANDLER=include/default-signal.h
+    ;;
+esac
+
+# If we're using sjlj exceptions, forget what we just learned.
+if test "$enable_sjlj_exceptions" = yes; then
+   SIGNAL_HANDLER=include/default-signal.h
+   SIGNAL_HANDLER_AUX=
+fi
+
+
+
+if test -z "$SIGNAL_HANDLER_AUX"; then
+  SIGNAL_HANDLER_AUX=$SIGNAL_HANDLER
+fi
+
+                    ac_config_links="$ac_config_links include/java-signal.h:$SIGNAL_HANDLER include/java-signal-aux.h:$SIGNAL_HANDLER_AUX"
+
+
+if test "${multilib}" = "yes"; then
+  multilib_arg="--enable-multilib"
+else
+  multilib_arg=
+fi
+
+# See if we support thread-local storage.
+
+   # Check whether --enable-tls or --disable-tls was given.
+if test "${enable_tls+set}" = set; then
+  enableval="$enable_tls"
+
+      case "$enableval" in
+       yes|no) ;;
+       *) { { echo "$as_me:$LINENO: error: Argument to enable/disable tls must be yes or no" >&5
+echo "$as_me: error: Argument to enable/disable tls must be yes or no" >&2;}
+   { (exit 1); exit 1; }; } ;;
+      esac
+
+else
+  enable_tls=yes
+fi;
+
+  echo "$as_me:$LINENO: checking whether the target supports thread-local storage" >&5
+echo $ECHO_N "checking whether the target supports thread-local storage... $ECHO_C" >&6
+if test "${have_tls+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    if test "$cross_compiling" = yes; then
+  cat >conftest.$ac_ext <<_ACEOF
+__thread int foo;
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  have_tls=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_tls=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+  cat >conftest.$ac_ext <<_ACEOF
+__thread int a; int b; int main() { return a = b; }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+                      save_LDFLAGS="$LDFLAGS"
+      LDFLAGS="-static $LDFLAGS"
+      if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+int main() { return 0; }
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+__thread int a; int b; int main() { return a = b; }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  have_tls=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+have_tls=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+have_tls=yes
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+      LDFLAGS="$save_LDFLAGS"
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+have_tls=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $have_tls" >&5
+echo "${ECHO_T}$have_tls" >&6
+  if test "$enable_tls $have_tls" = "yes yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TLS 1
+_ACEOF
+
+  fi
+
+# For _Unwind_GetIPInfo.
+
+
+
+  ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  ac_save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAGS -fno-exceptions"
+  echo "$as_me:$LINENO: checking for _Unwind_GetIPInfo" >&5
+echo $ECHO_N "checking for _Unwind_GetIPInfo... $ECHO_C" >&6
+  if test "${gcc_cv_getipinfo+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+  if test x$gcc_no_link = xyes; then
+  { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+extern "C" { extern void _Unwind_GetIPInfo(); }
+int
+main ()
+{
+_Unwind_GetIPInfo();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  gcc_cv_getipinfo=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gcc_cv_getipinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+  if test $gcc_cv_getipinfo = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETIPINFO 1
+_ACEOF
+
+  fi
+  echo "$as_me:$LINENO: result: $gcc_cv_getipinfo" >&5
+echo "${ECHO_T}$gcc_cv_getipinfo" >&6
+  CXXFLAGS="$ac_save_CXXFLAGS"
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Check if linker supports static linking on a per library basis
+LD_START_STATIC_SPEC=
+LD_FINISH_STATIC_SPEC=
+if $LD --help 2>&1 | grep -q -e -call_shared ; then
+  if $LD --help 2>&1 | grep -q -e -non_shared ; then
+    LD_START_STATIC_SPEC='%{static-libgcj:-non_shared}'
+    LD_FINISH_STATIC_SPEC='%{static-libgcj:-call_shared}'
+  fi
+fi
+
+
+
+here=`${PWDCMD-pwd}`
+
+
+# We get this from the environment.
+
+
+                                                                      ac_config_files="$ac_config_files Makefile libgcj.pc libgcj.spec libgcj-test.spec gcj/Makefile include/Makefile testsuite/Makefile"
+
+
+          ac_config_files="$ac_config_files scripts/jar"
+
+
+          ac_config_commands="$ac_config_commands default"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[	 ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[	 ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_i=`echo "$ac_i" |
+	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${BASH_JAR_TRUE}" && test -z "${BASH_JAR_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"BASH_JAR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"BASH_JAR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${XLIB_AWT_TRUE}" && test -z "${XLIB_AWT_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"XLIB_AWT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"XLIB_AWT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepGCJ_TRUE}" && test -z "${am__fastdepGCJ_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepGCJ\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepGCJ\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${TESTSUBDIR_TRUE}" && test -z "${TESTSUBDIR_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"TESTSUBDIR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"TESTSUBDIR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${JAVA_HOME_SET_TRUE}" && test -z "${JAVA_HOME_SET_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"JAVA_HOME_SET\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"JAVA_HOME_SET\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USING_WIN32_PLATFORM_TRUE}" && test -z "${USING_WIN32_PLATFORM_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USING_WIN32_PLATFORM\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USING_WIN32_PLATFORM\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USING_POSIX_PLATFORM_TRUE}" && test -z "${USING_POSIX_PLATFORM_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USING_POSIX_PLATFORM\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USING_POSIX_PLATFORM\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USING_DARWIN_CRT_TRUE}" && test -z "${USING_DARWIN_CRT_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USING_DARWIN_CRT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USING_DARWIN_CRT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USING_BOEHMGC_TRUE}" && test -z "${USING_BOEHMGC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USING_BOEHMGC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USING_BOEHMGC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USING_NOGC_TRUE}" && test -z "${USING_NOGC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USING_NOGC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USING_NOGC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USING_POSIX_THREADS_TRUE}" && test -z "${USING_POSIX_THREADS_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USING_POSIX_THREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USING_POSIX_THREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USING_WIN32_THREADS_TRUE}" && test -z "${USING_WIN32_THREADS_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USING_WIN32_THREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USING_WIN32_THREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USING_NO_THREADS_TRUE}" && test -z "${USING_NO_THREADS_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USING_NO_THREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USING_NO_THREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USE_LIBGCJ_BC_TRUE}" && test -z "${USE_LIBGCJ_BC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USE_LIBGCJ_BC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USE_LIBGCJ_BC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USING_GCC_TRUE}" && test -z "${USING_GCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"USING_GCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"USING_GCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${NATIVE_TRUE}" && test -z "${NATIVE_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"NATIVE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"NATIVE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${NEEDS_DATA_START_TRUE}" && test -z "${NEEDS_DATA_START_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"NEEDS_DATA_START\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"NEEDS_DATA_START\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by libjava $as_me version-unused, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration links:
+$config_links
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf at gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+libjava config.status version-unused
+configured by $0, generated by GNU Autoconf 2.59,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+
+srcdir="$srcdir"
+host="$host"
+target="$target"
+with_multisubdir="$with_multisubdir"
+with_multisrctop="$with_multisrctop"
+with_target_subdir="$with_target_subdir"
+ac_configure_args="${multilib_arg} ${ac_configure_args}"
+multi_basedir="$multi_basedir"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+CC="$CC"
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+srcdir=${srcdir}
+host=${host}
+target=${target}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="${multilib_arg} ${ac_configure_args}"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+multi_basedir=${multi_basedir}
+CC="${CC}"
+CXX="${CXX}"
+ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
+
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "libgcj.pc" ) CONFIG_FILES="$CONFIG_FILES libgcj.pc" ;;
+  "libgcj.spec" ) CONFIG_FILES="$CONFIG_FILES libgcj.spec" ;;
+  "libgcj-test.spec" ) CONFIG_FILES="$CONFIG_FILES libgcj-test.spec" ;;
+  "gcj/Makefile" ) CONFIG_FILES="$CONFIG_FILES gcj/Makefile" ;;
+  "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
+  "testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
+  "scripts/jar" ) CONFIG_FILES="$CONFIG_FILES scripts/jar" ;;
+  "include/platform.h" ) CONFIG_LINKS="$CONFIG_LINKS include/platform.h:include/$PLATFORMH" ;;
+  "java/io/natFile.cc" ) CONFIG_LINKS="$CONFIG_LINKS java/io/natFile.cc:java/io/natFile${FILE-${PLATFORM}}.cc" ;;
+  "java/lang/ConcreteProcess.java" ) CONFIG_LINKS="$CONFIG_LINKS java/lang/ConcreteProcess.java:java/lang/${PLATFORM}Process.java" ;;
+  "java/lang/natConcreteProcess.cc" ) CONFIG_LINKS="$CONFIG_LINKS java/lang/natConcreteProcess.cc:java/lang/nat${PLATFORM}Process.cc" ;;
+  "java/net/natInetAddress.cc" ) CONFIG_LINKS="$CONFIG_LINKS java/net/natInetAddress.cc:java/net/natInetAddress${PLATFORMNET}.cc" ;;
+  "java/net/natVMNetworkInterface.cc" ) CONFIG_LINKS="$CONFIG_LINKS java/net/natVMNetworkInterface.cc:java/net/natVMNetworkInterface${PLATFORMNET}.cc" ;;
+  "gnu/java/net/natPlainSocketImpl.cc" ) CONFIG_LINKS="$CONFIG_LINKS gnu/java/net/natPlainSocketImpl.cc:gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc" ;;
+  "gnu/java/net/natPlainDatagramSocketImpl.cc" ) CONFIG_LINKS="$CONFIG_LINKS gnu/java/net/natPlainDatagramSocketImpl.cc:gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc" ;;
+  "gnu/java/nio/natPipeImpl.cc" ) CONFIG_LINKS="$CONFIG_LINKS gnu/java/nio/natPipeImpl.cc:gnu/java/nio/natPipeImpl${PLATFORM}.cc" ;;
+  "gnu/java/nio/natSelectorImpl.cc" ) CONFIG_LINKS="$CONFIG_LINKS gnu/java/nio/natSelectorImpl.cc:gnu/java/nio/natSelectorImpl${PLATFORM}.cc" ;;
+  "gnu/java/nio/channels/natFileChannelImpl.cc" ) CONFIG_LINKS="$CONFIG_LINKS gnu/java/nio/channels/natFileChannelImpl.cc:gnu/java/nio/channels/natFileChannel${FILE-${PLATFORM}}.cc" ;;
+  "include/java-gc.h" ) CONFIG_LINKS="$CONFIG_LINKS include/java-gc.h:include/$GCHDR" ;;
+  "include/java-threads.h" ) CONFIG_LINKS="$CONFIG_LINKS include/java-threads.h:include/$THREADH" ;;
+  "sysdep/locks.h" ) CONFIG_LINKS="$CONFIG_LINKS sysdep/locks.h:sysdep/$sysdeps_dir/locks.h" ;;
+  "sysdep/backtrace.h" ) CONFIG_LINKS="$CONFIG_LINKS sysdep/backtrace.h:$fallback_backtrace_h" ;;
+  "sysdep/descriptor.h" ) CONFIG_LINKS="$CONFIG_LINKS sysdep/descriptor.h:$descriptor_h" ;;
+  "include/java-signal.h" ) CONFIG_LINKS="$CONFIG_LINKS include/java-signal.h:$SIGNAL_HANDLER" ;;
+  "include/java-signal-aux.h" ) CONFIG_LINKS="$CONFIG_LINKS include/java-signal-aux.h:$SIGNAL_HANDLER_AUX" ;;
+  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+  "include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;;
+  "gcj/libgcj-config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS gcj/libgcj-config.h" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s, at SHELL@,$SHELL,;t t
+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s, at exec_prefix@,$exec_prefix,;t t
+s, at prefix@,$prefix,;t t
+s, at program_transform_name@,$program_transform_name,;t t
+s, at bindir@,$bindir,;t t
+s, at sbindir@,$sbindir,;t t
+s, at libexecdir@,$libexecdir,;t t
+s, at datadir@,$datadir,;t t
+s, at sysconfdir@,$sysconfdir,;t t
+s, at sharedstatedir@,$sharedstatedir,;t t
+s, at localstatedir@,$localstatedir,;t t
+s, at libdir@,$libdir,;t t
+s, at includedir@,$includedir,;t t
+s, at oldincludedir@,$oldincludedir,;t t
+s, at infodir@,$infodir,;t t
+s, at mandir@,$mandir,;t t
+s, at build_alias@,$build_alias,;t t
+s, at host_alias@,$host_alias,;t t
+s, at target_alias@,$target_alias,;t t
+s, at DEFS@,$DEFS,;t t
+s, at ECHO_C@,$ECHO_C,;t t
+s, at ECHO_N@,$ECHO_N,;t t
+s, at ECHO_T@,$ECHO_T,;t t
+s, at LIBS@,$LIBS,;t t
+s, at build@,$build,;t t
+s, at build_cpu@,$build_cpu,;t t
+s, at build_vendor@,$build_vendor,;t t
+s, at build_os@,$build_os,;t t
+s, at build_libsubdir@,$build_libsubdir,;t t
+s, at build_subdir@,$build_subdir,;t t
+s, at host_subdir@,$host_subdir,;t t
+s, at target_subdir@,$target_subdir,;t t
+s, at multi_basedir@,$multi_basedir,;t t
+s, at host@,$host,;t t
+s, at host_cpu@,$host_cpu,;t t
+s, at host_vendor@,$host_vendor,;t t
+s, at host_os@,$host_os,;t t
+s, at target@,$target,;t t
+s, at target_cpu@,$target_cpu,;t t
+s, at target_vendor@,$target_vendor,;t t
+s, at target_os@,$target_os,;t t
+s, at target_noncanonical@,$target_noncanonical,;t t
+s, at LN_S@,$LN_S,;t t
+s, at mkinstalldirs@,$mkinstalldirs,;t t
+s, at CC@,$CC,;t t
+s, at ac_ct_CC@,$ac_ct_CC,;t t
+s, at EXEEXT@,$EXEEXT,;t t
+s, at OBJEXT@,$OBJEXT,;t t
+s, at CXX@,$CXX,;t t
+s, at ac_ct_CXX@,$ac_ct_CXX,;t t
+s, at CFLAGS@,$CFLAGS,;t t
+s, at CXXFLAGS@,$CXXFLAGS,;t t
+s, at LDFLAGS@,$LDFLAGS,;t t
+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
+s, at CYGPATH_W@,$CYGPATH_W,;t t
+s, at PACKAGE@,$PACKAGE,;t t
+s, at VERSION@,$VERSION,;t t
+s, at ACLOCAL@,$ACLOCAL,;t t
+s, at AUTOCONF@,$AUTOCONF,;t t
+s, at AUTOMAKE@,$AUTOMAKE,;t t
+s, at AUTOHEADER@,$AUTOHEADER,;t t
+s, at MAKEINFO@,$MAKEINFO,;t t
+s, at install_sh@,$install_sh,;t t
+s, at STRIP@,$STRIP,;t t
+s, at ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s, at INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s, at mkdir_p@,$mkdir_p,;t t
+s, at AWK@,$AWK,;t t
+s, at SET_MAKE@,$SET_MAKE,;t t
+s, at am__leading_dot@,$am__leading_dot,;t t
+s, at AMTAR@,$AMTAR,;t t
+s, at am__tar@,$am__tar,;t t
+s, at am__untar@,$am__untar,;t t
+s, at DEPDIR@,$DEPDIR,;t t
+s, at am__include@,$am__include,;t t
+s, at am__quote@,$am__quote,;t t
+s, at AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s, at AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s, at AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s, at CCDEPMODE@,$CCDEPMODE,;t t
+s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s, at CXXDEPMODE@,$CXXDEPMODE,;t t
+s, at am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
+s, at am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
+s, at AS@,$AS,;t t
+s, at ac_ct_AS@,$ac_ct_AS,;t t
+s, at LD@,$LD,;t t
+s, at ac_ct_LD@,$ac_ct_LD,;t t
+s, at AR@,$AR,;t t
+s, at ac_ct_AR@,$ac_ct_AR,;t t
+s, at RANLIB@,$RANLIB,;t t
+s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s, at JAR@,$JAR,;t t
+s, at ZIP@,$ZIP,;t t
+s, at UNZIP@,$UNZIP,;t t
+s, at BASH_JAR_TRUE@,$BASH_JAR_TRUE,;t t
+s, at BASH_JAR_FALSE@,$BASH_JAR_FALSE,;t t
+s, at MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
+s, at MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
+s, at MAINT@,$MAINT,;t t
+s, at LIBGCJ_CFLAGS@,$LIBGCJ_CFLAGS,;t t
+s, at LIBGCJ_CXXFLAGS@,$LIBGCJ_CXXFLAGS,;t t
+s, at LIBGCJ_JAVAFLAGS@,$LIBGCJ_JAVAFLAGS,;t t
+s, at LIBGCJ_LD_SYMBOLIC@,$LIBGCJ_LD_SYMBOLIC,;t t
+s, at LIBGCJDEBUG@,$LIBGCJDEBUG,;t t
+s, at TOOLKIT@,$TOOLKIT,;t t
+s, at XLIB_AWT_TRUE@,$XLIB_AWT_TRUE,;t t
+s, at XLIB_AWT_FALSE@,$XLIB_AWT_FALSE,;t t
+s, at GCJH@,$GCJH,;t t
+s, at INCLTDL@,$INCLTDL,;t t
+s, at LIBLTDL@,$LIBLTDL,;t t
+s, at DIRLTDL@,$DIRLTDL,;t t
+s, at LIBTOOL@,$LIBTOOL,;t t
+s, at CXXCPP@,$CXXCPP,;t t
+s, at CPPFLAGS@,$CPPFLAGS,;t t
+s, at GCJ@,$GCJ,;t t
+s, at GCJFLAGS@,$GCJFLAGS,;t t
+s, at GCJDEPMODE@,$GCJDEPMODE,;t t
+s, at am__fastdepGCJ_TRUE@,$am__fastdepGCJ_TRUE,;t t
+s, at am__fastdepGCJ_FALSE@,$am__fastdepGCJ_FALSE,;t t
+s, at subdirs@,$subdirs,;t t
+s, at TESTSUBDIR_TRUE@,$TESTSUBDIR_TRUE,;t t
+s, at TESTSUBDIR_FALSE@,$TESTSUBDIR_FALSE,;t t
+s, at JAVA_HOME_SET_TRUE@,$JAVA_HOME_SET_TRUE,;t t
+s, at JAVA_HOME_SET_FALSE@,$JAVA_HOME_SET_FALSE,;t t
+s, at JAVA_HOME@,$JAVA_HOME,;t t
+s, at INTERPRETER@,$INTERPRETER,;t t
+s, at LIBFFI@,$LIBFFI,;t t
+s, at LIBFFIINCS@,$LIBFFIINCS,;t t
+s, at PLATFORM_INNER_NAT_HDRS@,$PLATFORM_INNER_NAT_HDRS,;t t
+s, at CPP@,$CPP,;t t
+s, at EGREP@,$EGREP,;t t
+s, at USING_WIN32_PLATFORM_TRUE@,$USING_WIN32_PLATFORM_TRUE,;t t
+s, at USING_WIN32_PLATFORM_FALSE@,$USING_WIN32_PLATFORM_FALSE,;t t
+s, at USING_POSIX_PLATFORM_TRUE@,$USING_POSIX_PLATFORM_TRUE,;t t
+s, at USING_POSIX_PLATFORM_FALSE@,$USING_POSIX_PLATFORM_FALSE,;t t
+s, at USING_DARWIN_CRT_TRUE@,$USING_DARWIN_CRT_TRUE,;t t
+s, at USING_DARWIN_CRT_FALSE@,$USING_DARWIN_CRT_FALSE,;t t
+s, at SYSTEMSPEC@,$SYSTEMSPEC,;t t
+s, at LIBGCJTESTSPEC@,$LIBGCJTESTSPEC,;t t
+s, at ZLIBSPEC@,$ZLIBSPEC,;t t
+s, at ZLIBTESTSPEC@,$ZLIBTESTSPEC,;t t
+s, at X_CFLAGS@,$X_CFLAGS,;t t
+s, at X_PRE_LIBS@,$X_PRE_LIBS,;t t
+s, at X_LIBS@,$X_LIBS,;t t
+s, at X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
+s, at extra_ldflags_libjava@,$extra_ldflags_libjava,;t t
+s, at GCLIBS@,$GCLIBS,;t t
+s, at GCINCS@,$GCINCS,;t t
+s, at GCDEPS@,$GCDEPS,;t t
+s, at GCSPEC@,$GCSPEC,;t t
+s, at JC1GCSPEC@,$JC1GCSPEC,;t t
+s, at GCTESTSPEC@,$GCTESTSPEC,;t t
+s, at USING_BOEHMGC_TRUE@,$USING_BOEHMGC_TRUE,;t t
+s, at USING_BOEHMGC_FALSE@,$USING_BOEHMGC_FALSE,;t t
+s, at USING_NOGC_TRUE@,$USING_NOGC_TRUE,;t t
+s, at USING_NOGC_FALSE@,$USING_NOGC_FALSE,;t t
+s, at THREADLIBS@,$THREADLIBS,;t t
+s, at THREADINCS@,$THREADINCS,;t t
+s, at THREADDEPS@,$THREADDEPS,;t t
+s, at THREADSPEC@,$THREADSPEC,;t t
+s, at THREADSTARTFILESPEC@,$THREADSTARTFILESPEC,;t t
+s, at THREADLDFLAGS@,$THREADLDFLAGS,;t t
+s, at THREADCXXFLAGS@,$THREADCXXFLAGS,;t t
+s, at USING_POSIX_THREADS_TRUE@,$USING_POSIX_THREADS_TRUE,;t t
+s, at USING_POSIX_THREADS_FALSE@,$USING_POSIX_THREADS_FALSE,;t t
+s, at USING_WIN32_THREADS_TRUE@,$USING_WIN32_THREADS_TRUE,;t t
+s, at USING_WIN32_THREADS_FALSE@,$USING_WIN32_THREADS_FALSE,;t t
+s, at USING_NO_THREADS_TRUE@,$USING_NO_THREADS_TRUE,;t t
+s, at USING_NO_THREADS_FALSE@,$USING_NO_THREADS_FALSE,;t t
+s, at USE_LIBGCJ_BC_TRUE@,$USE_LIBGCJ_BC_TRUE,;t t
+s, at USE_LIBGCJ_BC_FALSE@,$USE_LIBGCJ_BC_FALSE,;t t
+s, at LIBGCJ_SPEC@,$LIBGCJ_SPEC,;t t
+s, at HASH_SYNC_SPEC@,$HASH_SYNC_SPEC,;t t
+s, at USING_GCC_TRUE@,$USING_GCC_TRUE,;t t
+s, at USING_GCC_FALSE@,$USING_GCC_FALSE,;t t
+s, at LIBICONV@,$LIBICONV,;t t
+s, at LTLIBICONV@,$LTLIBICONV,;t t
+s, at PKG_CONFIG@,$PKG_CONFIG,;t t
+s, at GTK_CFLAGS@,$GTK_CFLAGS,;t t
+s, at GTK_LIBS@,$GTK_LIBS,;t t
+s, at GLIB_CFLAGS@,$GLIB_CFLAGS,;t t
+s, at GLIB_LIBS@,$GLIB_LIBS,;t t
+s, at LIBART_CFLAGS@,$LIBART_CFLAGS,;t t
+s, at LIBART_LIBS@,$LIBART_LIBS,;t t
+s, at CLASSPATH_SEPARATOR@,$CLASSPATH_SEPARATOR,;t t
+s, at ac_ct_GCJ@,$ac_ct_GCJ,;t t
+s, at ZLIBS@,$ZLIBS,;t t
+s, at SYS_ZLIBS@,$SYS_ZLIBS,;t t
+s, at ZINCS@,$ZINCS,;t t
+s, at DIVIDESPEC@,$DIVIDESPEC,;t t
+s, at CHECKREFSPEC@,$CHECKREFSPEC,;t t
+s, at EXCEPTIONSPEC@,$EXCEPTIONSPEC,;t t
+s, at BACKTRACESPEC@,$BACKTRACESPEC,;t t
+s, at IEEESPEC@,$IEEESPEC,;t t
+s, at NATIVE_TRUE@,$NATIVE_TRUE,;t t
+s, at NATIVE_FALSE@,$NATIVE_FALSE,;t t
+s, at NEEDS_DATA_START_TRUE@,$NEEDS_DATA_START_TRUE,;t t
+s, at NEEDS_DATA_START_FALSE@,$NEEDS_DATA_START_FALSE,;t t
+s, at GCC_UNWIND_INCLUDE@,$GCC_UNWIND_INCLUDE,;t t
+s, at toolexecdir@,$toolexecdir,;t t
+s, at toolexecmainlibdir@,$toolexecmainlibdir,;t t
+s, at toolexeclibdir@,$toolexeclibdir,;t t
+s, at dbexecdir@,$dbexecdir,;t t
+s, at GCJVERSION@,$GCJVERSION,;t t
+s, at gxx_include_dir@,$gxx_include_dir,;t t
+s, at libstdcxx_incdir@,$libstdcxx_incdir,;t t
+s, at ALLOCA@,$ALLOCA,;t t
+s, at PERL@,$PERL,;t t
+s, at SYSDEP_SOURCES@,$SYSDEP_SOURCES,;t t
+s, at LD_START_STATIC_SPEC@,$LD_START_STATIC_SPEC,;t t
+s, at LD_FINISH_STATIC_SPEC@,$LD_FINISH_STATIC_SPEC,;t t
+s, at here@,$here,;t t
+s, at LIBOBJS@,$LIBOBJS,;t t
+s, at LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  esac
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+				     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s, at configure_input@,$configure_input,;t t
+s, at srcdir@,$ac_srcdir,;t t
+s, at abs_srcdir@,$ac_abs_srcdir,;t t
+s, at top_srcdir@,$ac_top_srcdir,;t t
+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s, at builddir@,$ac_builddir,;t t
+s, at abs_builddir@,$ac_abs_builddir,;t t
+s, at top_builddir@,$ac_top_builddir,;t t
+s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+s, at INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+  # Run the commands associated with the file.
+  case $ac_file in
+    scripts/jar ) chmod +x scripts/jar ;;
+  esac
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
+ac_dB='[	 ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 # Do quote $f, to prevent DOS paths from being IFS'd.
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $ac_file | $ac_file:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X$ac_file : 'X\(//\)[^/]' \| \
+	 X$ac_file : 'X\(//\)$' \| \
+	 X$ac_file : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X$ac_file |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`/stamp-h$_am_stamp_count
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_LINKS section.
+#
+
+for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+
+  { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
+echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
+
+  if test ! -r $srcdir/$ac_source; then
+    { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
+echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  rm -f $ac_dest
+
+  # Make relative symlinks.
+  ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_dest" : 'X\(//\)[^/]' \| \
+	 X"$ac_dest" : 'X\(//\)$' \| \
+	 X"$ac_dest" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dest_dir"
+  else
+    as_dir="$ac_dest_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dest_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dest_dir";;
+*)
+  case "$ac_dest_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  case $srcdir in
+  [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
+      *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
+  esac
+
+  # Try a symlink, then a hard link, then a copy.
+  ln -s $ac_rel_source $ac_dest 2>/dev/null ||
+    ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
+    cp -p $srcdir/$ac_source $ac_dest ||
+    { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
+echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
+   { (exit 1); exit 1; }; }
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_dest" : 'X\(//\)[^/]' \| \
+	 X"$ac_dest" : 'X\(//\)$' \| \
+	 X"$ac_dest" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+  case $ac_dest in
+    default-1 )
+# Only add multilib support code if we just rebuilt the top-level
+# Makefile.
+case " $CONFIG_FILES " in
+ *" Makefile "*)
+   ac_file=Makefile . ${multi_basedir}/config-ml.in
+   ;;
+esac ;;
+    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    { if $as_mkdir_p; then
+    mkdir -p $dirpart/$fdir
+  else
+    as_dir=$dirpart/$fdir
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+    default ) # Only add multilib support code if we just rebuilt top-level Makefile.
+case " $CONFIG_FILES " in
+ *" Makefile "*)
+   LD="${ORIGINAL_LD_FOR_MULTILIBS}"
+   ac_file=Makefile . ${multi_basedir}/./libjava/../config-ml.in
+   ;;
+esac
+for ac_multi_file in $CONFIG_FILES; do
+  case $ac_multi_file in
+  */Makefile)
+    grep "^MULTI[^ ]* =" Makefile >> "$ac_multi_file" ;;
+  esac
+done
+ ;;
+  esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+#
+# CONFIG_SUBDIRS section.
+#
+if test "$no_recursion" != yes; then
+
+  # Remove --cache-file and --srcdir arguments so they do not pile up.
+  ac_sub_configure_args=
+  ac_prev=
+  for ac_arg in $ac_configure_args; do
+    if test -n "$ac_prev"; then
+      ac_prev=
+      continue
+    fi
+    case $ac_arg in
+    -cache-file | --cache-file | --cache-fil | --cache-fi \
+    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+      ac_prev=cache_file ;;
+    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
+    | --c=*)
+      ;;
+    --config-cache | -C)
+      ;;
+    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+      ac_prev=srcdir ;;
+    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+      ;;
+    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+      ac_prev=prefix ;;
+    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+      ;;
+    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
+    esac
+  done
+
+  # Always prepend --prefix to ensure using the same prefix
+  # in subdir configurations.
+  ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args"
+
+  ac_popdir=`pwd`
+  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
+
+    # Do not complain, so a configure script can configure whichever
+    # parts of a large source tree are present.
+    test -d $srcdir/$ac_dir || continue
+
+    { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
+echo "$as_me: configuring in $ac_dir" >&6;}
+    { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+    cd $ac_dir
+
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'"
+    elif test -f $ac_srcdir/configure; then
+      ac_sub_configure="$SHELL '$ac_srcdir/configure'"
+    elif test -f $ac_srcdir/configure.in; then
+      ac_sub_configure=$ac_configure
+    else
+      { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
+echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
+      ac_sub_configure=
+    fi
+
+    # The recursion is here.
+    if test -n "$ac_sub_configure"; then
+      # Make the cache file name correct relative to the subdirectory.
+      case $cache_file in
+      [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
+      *) # Relative path.
+	ac_sub_cache_file=$ac_top_builddir$cache_file ;;
+      esac
+
+      { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+      # The eval makes quoting arguments work.
+      eval $ac_sub_configure $ac_sub_configure_args \
+	   --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir ||
+	{ { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
+echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+
+    cd $ac_popdir
+  done
+fi
+

Propchange: llvm-gcc-4.2/trunk/libjava/configure

------------------------------------------------------------------------------
    svn:executable = *

Added: llvm-gcc-4.2/trunk/libjava/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/configure.ac?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/configure.ac (added)
+++ llvm-gcc-4.2/trunk/libjava/configure.ac Thu Nov  8 16:56:19 2007
@@ -0,0 +1,1514 @@
+dnl # Process this with autoconf to create configure
+AC_PREREQ(2.59)
+# Still use "libjava" here to placate dejagnu.
+AC_INIT([libjava], [version-unused],, [libjava])
+
+AC_CONFIG_SRCDIR(java/lang/System.java)
+
+GCC_TOPLEV_SUBDIRS
+
+# We use these options to decide which functions to include.
+AC_ARG_WITH(target-subdir,
+  AS_HELP_STRING([--with-target-subdir=SUBDIR],
+                 [configure in a subdirectory]))
+
+# We may get other options which we don't document:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
+
+# Find the rest of the source tree framework.
+AM_ENABLE_MULTILIB(, ..)
+
+AC_CANONICAL_SYSTEM
+_GCC_TOPLEV_NONCANONICAL_BUILD
+_GCC_TOPLEV_NONCANONICAL_TARGET
+
+AC_SUBST(target_noncanonical)
+
+# This works around the fact that libtool configuration may change LD
+# for this particular configuration, but some shells, instead of
+# keeping the changes in LD private, export them just because LD is
+# exported.
+ORIGINAL_LD_FOR_MULTILIBS=$LD
+
+AC_PROG_LN_S
+
+# This works around an automake problem.
+mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"
+AC_SUBST(mkinstalldirs)
+
+AC_ARG_WITH(cross-host,
+  AS_HELP_STRING([--with-cross-host=HOST],
+                 [configure with a cross compiler from HOST]))
+
+AC_ARG_WITH(newlib,
+  AS_HELP_STRING([--with-newlib],
+                 [configure with newlib]))
+
+AC_ARG_ENABLE(version-specific-runtime-libs,
+  AS_HELP_STRING([--enable-version-specific-runtime-libs],    
+                 [specify that runtime libraries should be installed in a compiler-specific directory]),
+    [case "$enableval" in
+      yes) version_specific_libs=yes ;;
+      no)  version_specific_libs=no ;;
+      *)   AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
+     esac],
+    [version_specific_libs=no]
+)
+
+AC_ARG_ENABLE(plugin,
+  AS_HELP_STRING([--enable-plugin],
+                 [build gcjwebplugin web browser plugin]),
+    [case "$enableval" in
+      yes) plugin_enabled=yes ;;
+      no)  plugin_enabled=no ;;
+      *)   AC_MSG_ERROR([Unknown argument to enable/disable plugin]);;
+     esac],
+    [plugin_enabled=no]
+)
+
+AC_ARG_ENABLE(gconf-peer,
+  AS_HELP_STRING([--enable-gconf-peer],
+                 [compile GConf native peers for util.preferences]),
+    [case "$enableval" in
+      yes) gconf_enabled=yes ;;
+      no)  gconf_enabled=no ;;
+      *)   AC_MSG_ERROR([Unknown argument to enable/disable gconf-peer]);;
+     esac],
+    [gconf_enabled=no]
+)
+
+# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
+GCC_NO_EXECUTABLES
+
+# (1) We use an abnormal CXX (without library references), so we
+# must cache it under a different name.
+# (2) CC, CFLAGS, CXX, CXXFLAGS, LDFLAGS must not be 'precious', or
+# the non-multilib-adjusted value will be used in multilibs.
+# (3) As a side effect, we must SUBST CXXFLAGS, CFLAGS, and LDFLAGS ourselves.
+# (4) As another side effect, automake doesn't automatically include them
+# in Makefile.in.
+# (5) For libstdc++-v3, -fno-builtin must be present here so that a
+# non-conflicting form of std::exit can be guessed by AC_PROG_CXX, and
+# used in later tests.  This may not be necessary in libjava; I don't know.
+m4_define([ac_cv_prog_CXX],[glibcxx_cv_prog_CXX])
+m4_rename([_AC_ARG_VAR_PRECIOUS],[glibcxx_PRECIOUS])
+m4_define([_AC_ARG_VAR_PRECIOUS],[])
+save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS -fno-builtin"
+AC_PROG_CC
+AC_PROG_CXX
+CXXFLAGS="$save_CXXFLAGS"
+m4_rename([glibcxx_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
+AC_SUBST(CFLAGS)
+AC_SUBST(CXXFLAGS)
+AC_SUBST(LDFLAGS)
+
+AM_INIT_AUTOMAKE([1.9.0])
+
+AC_CHECK_TOOL(AS, as)
+AC_CHECK_TOOL(LD, ld)
+AC_CHECK_TOOL(AR, ar)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_PROG_AWK
+AC_CHECK_PROGS([JAR], [jar fastjar], no)
+AC_PATH_PROG([ZIP], [zip], no)
+AC_PATH_PROG([UNZIP], [unzip], unzip)
+AM_CONDITIONAL(BASH_JAR, test "$JAR" = no)
+if test "$ZIP" = no; then
+  if test "$JAR" = no; then
+    AC_MSG_ERROR([cannot find neither zip nor jar, cannot continue])
+  fi
+else
+  # InfoZIP available, use the 'guaranteed' Bourne-shell JAR to build libjava
+  JAR=`pwd`/scripts/jar
+fi
+
+AC_PROG_INSTALL
+
+AM_MAINTAINER_MODE
+
+AC_EXEEXT
+
+# configure.host sets the following important variables
+#	libgcj_cflags    - host specific C compiler flags
+#	libgcj_cxxflags  - host specific C++ compiler flags
+#	libgcj_javaflags - host specific Java compiler flags
+
+libgcj_cflags=
+libgcj_cxxflags=
+libgcj_javaflags=
+
+. ${srcdir}/configure.host
+
+LIBGCJ_CFLAGS="${libgcj_cflags}"
+LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
+LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
+LIBGCJ_LD_SYMBOLIC="${libgcj_ld_symbolic}"
+AC_SUBST(LIBGCJ_CFLAGS)
+AC_SUBST(LIBGCJ_CXXFLAGS)
+AC_SUBST(LIBGCJ_JAVAFLAGS)
+AC_SUBST(LIBGCJ_LD_SYMBOLIC)
+
+# Only use libltdl for non-newlib builds.
+if test "x${with_newlib}" = "x" || test "x${with_newlib}" = "xno"; then
+   AC_LTDL_SHLIBPATH
+fi
+
+AC_CONFIG_HEADERS([include/config.h gcj/libgcj-config.h])
+
+# See if the user has requested runtime debugging.
+LIBGCJDEBUG="disable"
+AC_SUBST(LIBGCJDEBUG)
+AC_ARG_ENABLE(libgcj-debug,
+  AS_HELP_STRING([--enable-libgcj-debug],
+                 [enable runtime debugging code]),
+  [if test "$enable_libgcj_debug" = yes; then
+    AC_DEFINE(DEBUG, 1, [Define this if you want runtime debugging enabled.])
+    LIBGCJDEBUG="enable"
+  fi])
+
+# Determine which AWT peer libraries to build
+AC_ARG_ENABLE(java-awt,
+  AS_HELP_STRING([--enable-java-awt],
+                 [list of AWT peer implementations to be built]))
+
+peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
+use_xlib_awt=""
+use_gtk_awt=""
+use_qt_awt=""
+# The default toolkit to use is the first one specified.
+TOOLKIT=
+AC_SUBST(TOOLKIT)
+
+for peer in $peerlibs ; do
+  case $peer in
+    xlib)
+      if test "$no_x" = yes; then
+        echo "*** xlib peers requested but no X library available" 1>&2
+        exit 1
+      else
+        use_xlib_awt="yes"
+	if test -z "$TOOLKIT"; then
+	   TOOLKIT=gnu.awt.xlib.XToolkit
+	fi
+      fi
+      ;;
+    gtk)
+      if test "$no_x" = yes; then
+	 echo "*** gtk peers requested but no X library available" 1>&2
+	 exit 1
+      else
+	 use_gtk_awt=yes
+	 if test -z "$TOOLKIT"; then
+	    TOOLKIT=gnu.java.awt.peer.gtk.GtkToolkit
+	 fi
+      fi
+      ;;
+    qt)
+      if test "$no_x" = yes; then
+         # Perhaps we should admit the possibility of embedded Qt.
+	 echo "*** Qt peers requested but no X library available" 1>&2
+	 exit 1
+      else
+	 use_qt_awt=yes
+	 if test -z "$TOOLKIT"; then
+	    TOOLKIT=gnu.java.awt.peer.qt.QtToolkit
+	 fi
+      fi
+      ;;
+    no)
+      use_xlib_awt=
+      use_gtk_awt=
+      use_qt_awt=
+      break
+      ;;
+    *)
+      echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2
+      exit 1
+  esac
+done
+
+AM_CONDITIONAL(XLIB_AWT, test "$use_xlib_awt" = yes)
+
+# Create standard.omit based on decisions we just made.
+cp $srcdir/standard.omit.in standard.omit
+if test "$use_xlib_awt" != yes; then
+   echo gnu/awt/xlib >> standard.omit
+   echo gnu/gcj/xlib >> standard.omit
+fi
+
+if test -z "${with_multisubdir}"; then
+   builddotdot=.
+else
+   builddotdot=`echo ${with_multisubdir} | sed -e 's:[[^/]][[^/]]*:..:g'`
+fi
+
+NATIVE=yes
+
+# Which gcj do we use?
+which_gcj=default
+built_gcc_dir="`cd ${builddotdot}/../../${host_subdir}/gcc && ${PWDCMD-pwd}`"
+if test -n "${with_cross_host}"; then
+  # We are being configured with a cross compiler. We can't
+  # use ac_exeext, because that is for the target platform.
+  NATIVE=no
+  cross_host_exeext=
+  case "${with_cross_host}" in
+     *mingw* | *cygwin*)
+         cross_host_exeext=.exe
+     ;;
+  esac
+  if test -x "${built_gcc_dir}/gcj${cross_host_exeext}"; then
+     if test x"$build_noncanonical" = x"$with_cross_host"; then
+        # Ordinary cross (host!=target and host=build)
+        which_gcj=built
+     else
+        # Canadian cross (host!=target and host!=build)
+        which_gcj=cross
+     fi
+  else
+     which_gcj=cross
+  fi
+else
+  # We are being configured with a native or crossed-native compiler
+  if test -x "${built_gcc_dir}/gcj${ac_exeext}"; then
+     if test x"$build" = x"$host"; then
+        # True native build (host=target and host=build)
+        which_gcj=built
+     else
+        # Crossed-native build (host=target and host!=build)
+        which_gcj=cross
+     fi
+  else
+     which_gcj=path
+  fi
+fi
+case "${which_gcj}" in
+   built)
+      GCJ="$built_gcc_dir/gcj -B`${PWDCMD-pwd}`/ -B$built_gcc_dir/"
+      GCJH='$(top_builddir)/$(MULTIBUILDTOP)../../$(host_subdir)/gcc/gcjh'
+   ;;
+   cross)
+      if test "x${with_newlib}" = "xyes"; then
+         # FIXME (comment): Why is this needed?
+         GCC_UNWIND_INCLUDE=
+         GCJ="${target_noncanonical}-gcj"
+      else
+         GCJ="${target_noncanonical}-gcj -B`${PWDCMD-pwd}`/"
+      fi
+      GCJH='$(target_noncanonical)-gcjh'
+   ;;
+   path)
+      GCJ="gcj -B`${PWDCMD-pwd}`/"
+      GCJH=gcjh
+   ;;
+esac
+
+AC_SUBST(GCJH)
+
+# Create it, so that compile/link tests don't fail
+test -f libgcj.spec || touch libgcj.spec
+
+
+
+# Set up to configure Classpath.
+# FIXME: no supported way to pass args in autoconf.
+ac_configure_args="$ac_configure_args --with-fastjar=$JAR"
+ac_configure_args="$ac_configure_args --enable-tool-wrappers"
+ac_configure_args="$ac_configure_args --disable-load-library"
+ac_configure_args="$ac_configure_args --${LIBGCJDEBUG}-debug"
+ac_configure_args="$ac_configure_args --enable-default-toolkit=$TOOLKIT"
+dir1=`cd $srcdir && pwd`
+dir2=`pwd`
+ac_configure_args="$ac_configure_args --with-vm-classes=$dir1:$dir2"
+ac_configure_args="$ac_configure_args --disable-core-jni"
+dnl FIXME?
+ac_configure_args="$ac_configure_args --disable-examples"
+ac_configure_args="$ac_configure_args --with-glibj=build"
+if test "$plugin_enabled" != yes; then
+  ac_configure_args="$ac_configure_args --disable-plugin"
+fi
+if test "$gconf_enabled" != yes; then
+  ac_configure_args="$ac_configure_args --disable-gconf-peer"
+  ac_configure_args="$ac_configure_args --enable-default-preferences-peer=gnu.java.util.prefs.FileBasedFactory"
+fi
+if test "$use_gtk_awt" != yes; then
+  ac_configure_args="$ac_configure_args --disable-gtk-peer"
+fi
+if test "$use_qt_awt" != yes; then
+  ac_configure_args="$ac_configure_args --disable-qt-peer"
+else
+  # We need this as qt is disabled by default in classpath.
+  ac_configure_args="$ac_configure_args --enable-qt-peer"
+fi
+dnl --with-gcj=$GCJ
+dnl --with-javah=$GCJH
+dnl gjdoc?
+dnl gtk-cairo -- just export here...
+dnl --enable-regen-headers?
+
+# Only use libltdl for non-newlib builds.
+if test "x${with_newlib}" = "x" || test "x${with_newlib}" = "xno"; then
+   AC_LIBLTDL_CONVENIENCE
+   AC_LIBTOOL_DLOPEN
+   DIRLTDL=libltdl
+   AC_DEFINE(USE_LTDL, 1, [Define if libltdl is in use.])
+   # Sigh.  Libtool's macro doesn't do the right thing.
+   INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
+   # FIXME: this is a hack.
+   sub_auxdir="`cd $ac_aux_dir && ${PWDCMD-pwd}`"
+   ac_configure_args="$ac_configure_args --with-auxdir=$sub_auxdir"
+fi
+AC_SUBST(INCLTDL)
+AC_SUBST(LIBLTDL)
+AC_SUBST(DIRLTDL)
+AC_PROG_LIBTOOL
+AM_PROG_GCJ
+AM_PROG_CC_C_O
+
+AC_CONFIG_SUBDIRS(classpath libltdl)
+
+# The -no-testsuite modules omit the test subdir.
+AM_CONDITIONAL(TESTSUBDIR, test -d $srcdir/testsuite)
+
+# Should the runtime set system properties by examining the 
+# environment variable GCJ_PROPERTIES?
+AC_ARG_ENABLE(getenv-properties,
+  AS_HELP_STRING([--disable-getenv-properties],
+                 [don't set system properties from GCJ_PROPERTIES]))
+
+# Whether GCJ_PROPERTIES is used depends on the target.
+if test -z "$enable_getenv_properties"; then
+   enable_getenv_properties=${enable_getenv_properties_default-yes}
+fi
+if test "$enable_getenv_properties" = no; then
+   AC_DEFINE(DISABLE_GETENV_PROPERTIES, 1,
+     [Define if system properties shouldn't be read from getenv("GCJ_PROPERTIES").])
+fi
+
+# Whether we should use arguments to main()
+if test -z "$enable_main_args"; then
+   enable_main_args=${enable_main_args_default-yes}
+fi
+if test "$enable_main_args" = no; then
+   AC_DEFINE(DISABLE_MAIN_ARGS, 1, [Define if we should ignore arguments to main().])
+fi
+
+
+# Should we use hashtable-based synchronization?
+# Currently works only for Linux X86/ia64
+# Typically faster and more space-efficient
+AC_ARG_ENABLE(hash-synchronization,
+  AS_HELP_STRING([--enable-hash-synchronization],
+                 [use global hash table for monitor locks]))
+
+if test -z "$enable_hash_synchronization"; then
+   enable_hash_synchronization=$enable_hash_synchronization_default
+fi
+
+AC_ARG_WITH(java-home,
+  AS_HELP_STRING([--with-java-home=DIRECTORY],
+                 [value of java.home system property]),
+		 [JAVA_HOME="${withval}"], [JAVA_HOME=""])
+AM_CONDITIONAL(JAVA_HOME_SET, test ! -z "$JAVA_HOME")
+AC_SUBST(JAVA_HOME)
+
+# What is the native OS API for MinGW?
+AC_ARG_WITH(win32-nlsapi,
+  AS_HELP_STRING([--with-win32-nlsapi=ansi or unicows or unicode],
+                 [native MinGW libgcj Win32 OS API (default is ansi)]),
+[case "${withval}" in
+  ansi) with_win32_nlsapi=ansi ;;
+  unicows) with_win32_nlsapi=unicows ;;
+  unicode) with_win32_nlsapi=unicode ;;
+  *) AC_MSG_ERROR(Bad value ${withval} for --with-win32-nlsapi.) ;;
+esac],[with_win32_nlsapi=ansi])
+
+case "${with_win32_nlsapi}" in
+  unicows | unicode) 
+    AC_DEFINE(MINGW_LIBGCJ_UNICODE, 1,
+      [Define if MinGW libgcj uses the Windows UNICODE OS API.])
+    ;;
+esac
+
+# configure.host sets slow_pthread_self if the synchronization code should 
+# try to avoid pthread_self calls by caching thread IDs in a hashtable.
+if test "${slow_pthread_self}" = "yes"; then
+  AC_DEFINE(SLOW_PTHREAD_SELF, 1,
+    [Define if if the synchronization code should try to avoid pthread_self calls by caching thread IDs in a hashtable.])
+fi
+
+# Check for gc debugging.  This option is handled both here and in the GC.
+AC_ARG_ENABLE(gc-debug,
+   AS_HELP_STRING([--enable-gc-debug],
+		  [include full support for pointer backtracing etc.]),
+[ if test "$enable_gc_debug" = "yes"; then
+    AC_DEFINE(LIBGCJ_GC_DEBUG, 1, 
+	      [Define if we want to use debug calls into the garbage collector.])
+  fi])
+
+# See if the user has the interpreter included.
+AC_ARG_ENABLE(interpreter,
+  AS_HELP_STRING([--enable-interpreter],
+                 [enable interpreter]),
+  [if test "$enable_interpreter" = yes; then
+    # This can also be set in configure.host.
+    libgcj_interpreter=yes
+  elif test "$enable_interpreter" = no; then
+    libgcj_interpreter=no
+  fi])
+
+if test "$libgcj_interpreter" = yes; then
+   AC_DEFINE(INTERPRETER, 1, [Define if you want a bytecode interpreter.])
+fi
+INTERPRETER="$libgcj_interpreter"
+AC_SUBST(INTERPRETER)
+
+AC_MSG_CHECKING([for exception model to use])
+AC_LANG_PUSH(C++)
+AC_ARG_ENABLE(sjlj-exceptions,
+  AS_HELP_STRING([--enable-sjlj-exceptions],
+                 [force use of builtin_setjmp for exceptions]),
+[:],
+[dnl Botheration.  Now we've got to detect the exception model.
+dnl Link tests against libgcc.a are problematic since -- at least
+dnl as of this writing -- we've not been given proper -L bits for
+dnl single-tree newlib and libgloss.
+dnl
+dnl This is what AC_TRY_COMPILE would do if it didn't delete the
+dnl conftest files before we got a change to grep them first.
+cat > conftest.$ac_ext << EOF
+[#]line __oline__ "configure"
+struct S { ~S(); };
+void bar();
+void foo()
+{
+  S s;
+  bar();
+}
+EOF
+old_CXXFLAGS="$CXXFLAGS"  
+CXXFLAGS=-S
+if AC_TRY_EVAL(ac_compile); then
+  if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
+    enable_sjlj_exceptions=yes
+  elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
+    enable_sjlj_exceptions=no
+  fi
+fi
+CXXFLAGS="$old_CXXFLAGS"
+rm -f conftest*])
+if test x$enable_sjlj_exceptions = xyes; then
+  AC_DEFINE(SJLJ_EXCEPTIONS, 1,
+	[Define if the compiler is configured for setjmp/longjmp exceptions.])
+  ac_exception_model_name=sjlj
+elif test x$enable_sjlj_exceptions = xno; then
+  ac_exception_model_name="call frame"
+else
+  AC_MSG_ERROR([unable to detect exception model])
+fi
+AC_LANG_POP(C++)
+AC_MSG_RESULT($ac_exception_model_name)
+
+# If we are non using SJLJ exceptions, and this host does not have support 
+# for unwinding from a signal handler, enable checked dereferences and divides.
+if test $can_unwind_signal = no && test $enable_sjlj_exceptions = no; then
+  CHECKREFSPEC=-fcheck-references
+  DIVIDESPEC=-fuse-divide-subroutine
+  EXCEPTIONSPEC=
+fi
+
+# See if the user wants to disable java.net.  This is the mildly
+# ugly way that we admit that target-side configuration sucks.
+AC_ARG_ENABLE(java-net,
+  AS_HELP_STRING([--disable-java-net],
+                 [disable java.net]))
+
+# Whether java.net is built by default can depend on the target.
+if test -z "$enable_java_net"; then
+   enable_java_net=${enable_java_net_default-yes}
+fi
+if test "$enable_java_net" = no; then
+   AC_DEFINE(DISABLE_JAVA_NET, 1, [Define if java.net native functions should be stubbed out.])
+fi
+
+# See if the user wants to configure without libffi.  Some
+# architectures don't support it, and default values are set in 
+# configure.host.
+AC_ARG_WITH(libffi,
+  AS_HELP_STRING([--without-libffi],
+                 [don't use libffi]),
+  [:],
+  [with_libffi=${with_libffi_default-yes}])
+
+LIBFFI=
+LIBFFIINCS=
+if test "$with_libffi" != no; then
+   AC_DEFINE(USE_LIBFFI, 1, [Define if we're to use libffi.])
+   LIBFFI=../libffi/libffi_convenience.la
+   LIBFFIINCS='-I$(top_srcdir)/../libffi/include -I../libffi/include'
+fi
+AC_SUBST(LIBFFI)
+AC_SUBST(LIBFFIINCS)
+
+# See if the user wants to disable JVMPI support.
+AC_ARG_ENABLE(jvmpi,
+  AS_HELP_STRING([--disable-jvmpi],
+                 [disable JVMPI support]))
+
+if test "$enable_jvmpi" != no; then
+    AC_DEFINE(ENABLE_JVMPI, 1, [Define if you are using JVMPI.])
+fi
+
+# If the target is an eCos system, use the appropriate eCos
+# I/O routines.
+# FIXME: this should not be a local option but a global target
+# system; at present there is no eCos target.
+TARGET_ECOS=${PROCESS-"no"}
+AC_ARG_WITH(ecos,
+[  --with-ecos             enable runtime eCos target support],
+TARGET_ECOS="$with_ecos"
+)
+
+PLATFORM_INNER_NAT_HDRS=
+case "$TARGET_ECOS" in
+   no) case "$host" in
+      *mingw*)
+            PLATFORM=Win32
+	    PLATFORMNET=Win32
+	    PLATFORMH=win32.h
+        CHECK_FOR_BROKEN_MINGW_LD
+      ;;
+      *)
+            PLATFORM=Posix
+	    PLATFORMNET=Posix
+	    PLATFORMH=posix.h
+	    PLATFORM_INNER_NAT_HDRS='java/lang/ConcreteProcess$$ProcessManager.h'
+      ;;
+      esac
+      ;;
+   *)
+      PLATFORM=Ecos
+      PLATFORMNET=NoNet
+      AC_DEFINE(ECOS, 1, [Define if you're running eCos.])
+      PLATFORMH=posix.h
+      ;;
+esac
+AC_SUBST(PLATFORM_INNER_NAT_HDRS)
+AC_CONFIG_LINKS(include/platform.h:include/$PLATFORMH)
+
+AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1,
+                                      [Define if you have int32_t and uint32_t.]))
+AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1,
+                                        [Define if you have int32_t and uint32_t.]))
+AC_EGREP_HEADER(u_int32_t, sys/types.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1,
+                                          [Define if you have u_int32_t]))
+AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1,
+                                           [Define if you have u_int32_t]))
+
+AM_CONDITIONAL(USING_WIN32_PLATFORM, test "$PLATFORM" = Win32)
+AM_CONDITIONAL(USING_POSIX_PLATFORM, test "$PLATFORM" = Posix || test "$PLATFORM" = Ecos)
+
+case "$host" in
+  *-darwin*) DARWIN_CRT=true ;;
+  *) DARWIN_CRT=false ;;
+esac
+AM_CONDITIONAL(USING_DARWIN_CRT, $DARWIN_CRT)
+
+# These may not be defined in a non-ANS conformant embedded system.
+# FIXME: Should these case a runtime exception in that case?
+AC_EGREP_HEADER(mktime, time.h, AC_DEFINE(HAVE_MKTIME, 1,
+                                  [Define is you have 'mktime' in <time.h>]))
+AC_EGREP_HEADER(localtime, time.h, AC_DEFINE(HAVE_LOCALTIME, 1,
+                                  [Define is you have 'localtime' in <time.h>]))
+
+# Create the subdirectory for natFile.cc, or the attempt
+# to create the link will fail.
+test -d java || mkdir java
+test -d java/io || mkdir java/io
+test -d gnu || mkdir gnu
+AC_CONFIG_LINKS(java/io/natFile.cc:java/io/natFile${FILE-${PLATFORM}}.cc)
+
+# Likewise for ConcreteProcess.java and natConcreteProcess.cc.
+test -d java/lang || mkdir java/lang
+AC_CONFIG_LINKS(java/lang/ConcreteProcess.java:java/lang/${PLATFORM}Process.java)
+AC_CONFIG_LINKS(java/lang/natConcreteProcess.cc:java/lang/nat${PLATFORM}Process.cc)
+
+# Likewise for natInetAddress.cc and natVMNetworkInterface.cc.
+test -d java/net || mkdir java/net
+AC_CONFIG_LINKS(java/net/natInetAddress.cc:java/net/natInetAddress${PLATFORMNET}.cc)
+AC_CONFIG_LINKS(java/net/natVMNetworkInterface.cc:java/net/natVMNetworkInterface${PLATFORMNET}.cc)
+
+# Likewise for natPlainSocketImpl.cc and natPlainDatagramSocketImpl.cc.
+test -d gnu/java || mkdir gnu/java
+test -d gnu/java/net || mkdir gnu/java/net
+AC_CONFIG_LINKS(gnu/java/net/natPlainSocketImpl.cc:gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc)
+AC_CONFIG_LINKS(gnu/java/net/natPlainDatagramSocketImpl.cc:gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc)
+
+# Likewise for natPipeImpl.cc and natSelectorImpl.cc.
+test -d gnu/java/nio || mkdir gnu/java/nio
+AC_CONFIG_LINKS(gnu/java/nio/natPipeImpl.cc:gnu/java/nio/natPipeImpl${PLATFORM}.cc)
+AC_CONFIG_LINKS(gnu/java/nio/natSelectorImpl.cc:gnu/java/nio/natSelectorImpl${PLATFORM}.cc)
+test -d gnu/java/nio/channels || mkdir gnu/java/nio/channels
+AC_CONFIG_LINKS(gnu/java/nio/channels/natFileChannelImpl.cc:gnu/java/nio/channels/natFileChannel${FILE-${PLATFORM}}.cc)
+
+case "${host}" in
+    *mingw*)
+      SYSTEMSPEC="-lgdi32 -lws2_32"
+      if test "${with_win32_nlsapi}" = "unicows"; then
+        SYSTEMSPEC="-lunicows $SYSTEMSPEC"
+      fi
+    ;;
+    *)
+      SYSTEMSPEC=
+    ;;
+esac
+AC_SUBST(SYSTEMSPEC)
+
+LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
+AC_SUBST(LIBGCJTESTSPEC)
+
+AC_ARG_WITH(system-zlib,
+  AS_HELP_STRING([--with-system-zlib],
+                 [use installed libz]))
+ZLIBSPEC=
+AC_SUBST(ZLIBSPEC)
+ZLIBTESTSPEC=
+AC_SUBST(ZLIBTESTSPEC)
+
+AC_PATH_XTRA
+
+# FIXME: this should be _libs on some hosts.
+libsubdir=.libs
+
+# extra LD Flags which are required for targets
+case "${host}" in
+*-*-darwin[[0-7]].*)
+    # For now we have to disable it on darwin[8-9] because it slows down
+    # the linking phase. A possible bug in ld?
+    # on Darwin -single_module speeds up loading of the dynamic libraries.
+    extra_ldflags_libjava=-Wl,-single_module
+    ;;
+esac
+AC_SUBST(extra_ldflags_libjava)
+
+# Allow the GC to be disabled.  Can be useful when debugging.
+AC_MSG_CHECKING([for garbage collector to use])
+AC_ARG_ENABLE(java-gc,
+  AS_HELP_STRING([--enable-java-gc=TYPE],
+                 [choose garbage collector (default is boehm)]),
+  [GC=$enableval],
+  [GC=boehm])
+GCLIBS=
+GCINCS=
+GCDEPS=
+GCSPEC=
+JC1GCSPEC=
+GCTESTSPEC=
+case "$GC" in
+ boehm)
+    AC_MSG_RESULT(boehm)
+    GCLIBS=../boehm-gc/libgcjgc_convenience.la
+    JC1GCSPEC='-fuse-boehm-gc'
+    GCTESTSPEC="-L`${PWDCMD-pwd}`/../boehm-gc/.libs -rpath `${PWDCMD-pwd}`/../boehm-gc/.libs"
+    GCINCS='-I$(top_srcdir)/../boehm-gc/include -I../boehm-gc/include'
+    GCOBJS=boehm.lo    
+    GCHDR=boehm-gc.h
+    # The POSIX thread support needs to know this.
+    AC_DEFINE(HAVE_BOEHM_GC, 1, [Define if Boehm GC in use.])
+    ;;
+ no)
+    AC_MSG_RESULT(none)
+    GCHDR=no-gc.h
+    ;;
+ *)
+    AC_MSG_ERROR([unrecognized collector "$GC"])
+    ;;
+esac
+AC_SUBST(GCLIBS)
+AC_SUBST(GCINCS)
+AC_SUBST(GCDEPS)
+AC_SUBST(GCSPEC)
+AC_SUBST(JC1GCSPEC)
+AC_SUBST(GCTESTSPEC)
+AC_CONFIG_LINKS(include/java-gc.h:include/$GCHDR)
+AM_CONDITIONAL(USING_BOEHMGC, test "$GC" = boehm)
+AM_CONDITIONAL(USING_NOGC, test "$GC" = no)
+
+
+AC_MSG_CHECKING([for thread model used by GCC])
+THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
+AC_MSG_RESULT([$THREADS])
+
+case "$THREADS" in
+ no | none | single)
+    THREADS=none
+    ;;
+ posix | posix95 | pthreads)
+    THREADS=posix
+    case "$host" in
+     *-*-linux*)
+	AC_DEFINE(LINUX_THREADS, 1, [Define if using POSIX threads on Linux.])
+	;;
+    esac
+    ;;
+ win32)
+    ;;
+ decosf1 | irix | mach | os2 | solaris | dce | vxworks)
+    AC_MSG_ERROR(thread package $THREADS not yet supported)
+    ;;
+ *)
+    AC_MSG_ERROR($THREADS is an unknown thread package)
+    ;;
+esac
+
+THREADCXXFLAGS=
+THREADLDFLAGS=
+THREADLIBS=
+THREADINCS=
+THREADDEPS=
+THREADH=
+THREADSPEC=
+THREADSTARTFILESPEC=
+case "$THREADS" in
+ posix)
+    case "$host" in
+     *-*-cygwin*)
+	# Don't set THREADLIBS here.  Cygwin doesn't have -lpthread.
+	;;
+     *-*-freebsd[[1234]]*)
+	# Before FreeBSD 5, it didn't have -lpthread (or any library which
+	# merely adds pthread_* functions) but it does have a -pthread switch
+	# which is required at link-time to select -lc_r *instead* of -lc.
+	THREADLDFLAGS=-pthread
+	# Don't set THREADSPEC here as might be expected since -pthread is
+	# not processed when found within a spec file, it must come from
+	# the command line.  For now, the user must provide the -pthread
+	# switch to link code compiled with gcj.  In future, consider adding
+	# support for weak references to pthread_* functions ala gthr.h API.
+	THREADSPEC='%{!pthread: %{!shared: %eUnder this configuration, the user must provide -pthread when linking.}}'
+	;;
+     *-*-freebsd*)
+	# FreeBSD >=5.3 implements a model much closer to other modern UNIX
+	# systems which support threads and -lpthread.
+	THREADLDFLAGS=-pthread
+	THREADSPEC=-lpthread
+	;;
+     alpha*-dec-osf* | hppa*-hp-hpux*)
+	THREADCXXFLAGS=-pthread
+	# boehm-gc needs some functions from librt, so link that too.
+	THREADLIBS='-lpthread -lrt'
+	THREADSPEC='-lpthread -lrt'
+	;;
+     *)
+	THREADLIBS=-lpthread
+	THREADSPEC=-lpthread
+	;;
+    esac
+    THREADH=posix-threads.h
+    # MIT pthreads doesn't seem to have the mutexattr functions.
+    # But for now we don't check for it.  We just assume you aren't
+    # using MIT pthreads.
+    AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_INIT, 1, [Define if using POSIX threads that have the mutexattr functions.])
+
+    # If we're using the Boehm GC, then we happen to know that it
+    # defines _REENTRANT, so we don't bother.  Eww.
+    if test "$GC" != boehm; then
+       AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads])
+    fi
+    AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Required define if using POSIX threads])
+    ;;
+
+ win32)
+    THREADH=win32-threads.h
+    THREADCXXFLAGS=-mthreads
+    # We need thread-safe exception handling so _CRT_MT should be set to 1.
+    # But we do not want the executables created to be dependent on
+    # mingwm10.dll which provides a __mingwthr_key_dtor() that cleans up
+    # exception handling contexts.  The following kludge achieves this effect
+    # and causes a dummy __mingwthr_key_dtor() to be linked in from
+    # libmingw32.a.  This causes a memory leak of about 24 bytes per thread.
+    # A workaround is to explicitly use -mthreads while linking Java programs.
+    # See PR libgcj/28263.
+    #
+    # FIXME: In Java we are able to detect thread death at the end of
+    # Thread.run() so we should be able to clean up the exception handling
+    # contexts ourselves.
+    THREADSTARTFILESPEC='crtmt%O%s'
+    ;;
+
+ none)
+    THREADH=no-threads.h
+    ;;
+esac
+AC_CONFIG_LINKS(include/java-threads.h:include/$THREADH)
+AC_SUBST(THREADLIBS)
+AC_SUBST(THREADINCS)
+AC_SUBST(THREADDEPS)
+AC_SUBST(THREADSPEC)
+AC_SUBST(THREADSTARTFILESPEC)
+AC_SUBST(THREADLDFLAGS)
+AC_SUBST(THREADCXXFLAGS)
+AM_CONDITIONAL(USING_POSIX_THREADS, test "$THREADS" = posix)
+AM_CONDITIONAL(USING_WIN32_THREADS, test "$THREADS" = win32)
+AM_CONDITIONAL(USING_NO_THREADS, test "$THREADS" = none)
+AM_CONDITIONAL(USE_LIBGCJ_BC, test "$use_libgcj_bc" = yes)
+
+if test -d sysdep; then true; else mkdir sysdep; fi
+AC_CONFIG_LINKS(sysdep/locks.h:sysdep/$sysdeps_dir/locks.h)
+AC_CONFIG_LINKS(sysdep/backtrace.h:$fallback_backtrace_h)
+AC_CONFIG_LINKS(sysdep/descriptor.h:$descriptor_h)
+
+LIBGCJ_SPEC="%{s-bc-abi:} -lgcj"
+if test "$use_libgcj_bc" = yes; then
+  LIBGCJ_SPEC="%{s-bc-abi:-lgcj_bc;:-lgcj}"
+fi
+AC_SUBST(LIBGCJ_SPEC)
+
+HASH_SYNC_SPEC=
+# Hash synchronization is only useful with posix threads right now.
+if test "$enable_hash_synchronization" = yes && test "$THREADS" != "none"; then
+   HASH_SYNC_SPEC=-fhash-synchronization
+   AC_DEFINE(JV_HASH_SYNCHRONIZATION, 1, [Define if hash synchronization is in use])
+fi
+AC_SUBST(HASH_SYNC_SPEC)
+
+AM_CONDITIONAL(USING_GCC, test "$GCC" = yes)
+
+# We're in the tree with gcc, and need to include some of its headers.
+GCC_UNWIND_INCLUDE='-I$(multi_basedir)/./libjava/../gcc'
+
+if test "x${with_newlib}" = "xyes"; then
+   # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
+   # may not work correctly, because the compiler may not be able to
+   # link executables.
+
+   # We assume newlib.  This lets us hard-code the functions we know
+   # we'll have.
+   AC_DEFINE(HAVE_MEMMOVE, 1, [Define if you have memmove.])
+   AC_DEFINE(HAVE_MEMCPY, 1, [Define if you have memcpy.])
+   AC_DEFINE(HAVE_STRERROR, 1, [Define if you have strerror.])
+   AC_DEFINE(HAVE_TIME, 1, [Define if you have time.])
+   AC_DEFINE(HAVE_GMTIME_R, 1, [Define if you have the 'gmtime_r' function])
+   AC_DEFINE(HAVE_LOCALTIME_R, 1, [Define if you have the 'localtime_r' function.])
+   AC_DEFINE(HAVE_USLEEP_DECL, 1, [Define if usleep is declared in <unistd.h>.])
+   # This is only for POSIX threads.
+   AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_INIT, 1, [Define if using POSIX threads that have the mutexattr functions.])
+   # We also assume we are using gcc, which provides alloca.
+   AC_DEFINE(HAVE_ALLOCA)
+
+   # Assume we do not have getuid and friends.
+   AC_DEFINE(NO_GETUID, 1, [Define if getuid() and friends are missing.])
+   PLATFORMNET=NoNet
+else
+   AC_CHECK_FUNCS([strerror ioctl select fstat open fsync sleep opendir \
+                   gmtime_r localtime_r readdir_r getpwuid_r getcwd \
+		   access stat lstat mkdir rename rmdir unlink utime chmod readlink \
+		   nl_langinfo setlocale \
+		   inet_pton uname inet_ntoa \
+		   fork execvp getrlimit pipe sigaction ftruncate mmap \
+		   getifaddrs])
+   AC_CHECK_FUNCS(inet_aton inet_addr, break)
+   AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h sys/resource.h)
+   # Do an additional check on dld, HP-UX for example has dladdr in libdld.sl
+   AC_CHECK_LIB(dl, dladdr, [
+       AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])], [
+       AC_CHECK_LIB(dld, dladdr, [
+       AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])])])
+
+   if test x"$cross_compiling" = x"no"; then
+     AC_CHECK_FILES(/proc/self/exe, [
+       AC_DEFINE(HAVE_PROC_SELF_EXE, 1, [Define if you have /proc/self/exe])])
+   else
+     case $host in
+     *-linux*)
+       AC_DEFINE(HAVE_PROC_SELF_EXE, 1, [Define if you have /proc/self/exe])
+       ;;
+     esac
+   fi
+
+   AM_ICONV
+   AM_LC_MESSAGES
+   AC_STRUCT_TIMEZONE
+
+   AC_CHECK_FUNCS(gethostbyname_r, [
+     AC_DEFINE(HAVE_GETHOSTBYNAME_R, 1,
+       [Define if you have the 'gethostbyname_r' function.])
+     # There are two different kinds of gethostbyname_r.
+     # We look for the one that returns `int'.
+     # Hopefully this check is robust enough.
+     AC_EGREP_HEADER(int.*gethostbyname_r, netdb.h, [
+       AC_DEFINE(GETHOSTBYNAME_R_RETURNS_INT, 1, [Define if gethostbyname_r returns 'int'.])])
+
+     case " $GCINCS " in
+     *" -D_REENTRANT "*) ;;
+     *)
+	dnl On DU4.0, gethostbyname_r is only declared with -D_REENTRANT
+	AC_CACHE_CHECK([whether gethostbyname_r declaration requires -D_REENTRANT],
+	[libjava_cv_gethostbyname_r_needs_reentrant],
+	[ AC_LANG_PUSH(C++)
+	  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]],
+	    [[gethostbyname_r("", 0, 0);]])],
+	    [libjava_cv_gethostbyname_r_needs_reentrant=no], [dnl
+		CPPFLAGS_SAVE="$CPPFLAGS"
+		CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[gethostbyname_r("", 0, 0);]])],
+		    [libjava_cv_gethostbyname_r_needs_reentrant=yes],
+		    [libjava_cv_gethostbyname_r_needs_reentrant=fail])
+		CPPFLAGS="$CPPFLAGS_SAVE"
+	  ])
+	  AC_LANG_POP(C++)
+	])
+	if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
+	  AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads])
+	fi
+     ;;
+     esac
+
+     AC_CACHE_CHECK([for struct hostent_data],
+	[libjava_cv_struct_hostent_data], [dnl
+	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
+# define _REENTRANT 1
+#endif
+#include <netdb.h>]], [[struct hostent_data data;]])],
+	  [libjava_cv_struct_hostent_data=yes],
+	  [libjava_cv_struct_hostent_data=no])])
+     if test "x$libjava_cv_struct_hostent_data" = xyes; then
+       AC_DEFINE(HAVE_STRUCT_HOSTENT_DATA, 1,
+         [Define if struct hostent_data is defined in netdb.h])
+     fi
+   ])
+
+   # FIXME: libjava source code expects to find a prototype for
+   # gethostbyaddr_r in netdb.h.  The outer check ensures that
+   # HAVE_GETHOSTBYADDR_R will not be defined if the prototype fails
+   # to exist where expected.  (The root issue: AC_CHECK_FUNCS assumes C
+   # linkage check is enough, yet C++ code requires proper prototypes.)
+   AC_EGREP_HEADER(gethostbyaddr_r, netdb.h, [
+   AC_CHECK_FUNCS(gethostbyaddr_r, [
+     AC_DEFINE(HAVE_GETHOSTBYADDR_R, 1,
+       [Define if you have the 'gethostbyaddr_r' function.])
+     # There are two different kinds of gethostbyaddr_r.
+     # We look for the one that returns `int'.
+     # Hopefully this check is robust enough.
+     AC_EGREP_HEADER(int.*gethostbyaddr_r, netdb.h, [
+       AC_DEFINE(GETHOSTBYADDR_R_RETURNS_INT, 1,
+         [Define if gethostbyaddr_r returns 'int'.])])])])
+
+   AC_CHECK_FUNCS(gethostname, [
+     AC_DEFINE(HAVE_GETHOSTNAME, 1,
+       [Define if you have the 'gethostname' function.])
+     AC_EGREP_HEADER(gethostname, unistd.h, [
+       AC_DEFINE(HAVE_GETHOSTNAME_DECL, 1,
+         [Define if gethostname is declared in <unistd.h>.])])])
+
+   AC_CHECK_FUNCS(usleep, [
+     AC_EGREP_HEADER(usleep, unistd.h, [
+       AC_DEFINE(HAVE_USLEEP_DECL, 1,
+          [Define if usleep is declared in <unistd.h>.])])])
+
+   # Look for these functions in the thread library, but only bother
+   # if using POSIX threads.
+   if test "$THREADS" = posix; then
+      save_LIBS="$LIBS"
+      LIBS="$LIBS $THREADLIBS"
+      # Some POSIX thread systems don't have pthread_mutexattr_settype.
+      # E.g., Solaris.
+      AC_CHECK_FUNCS(pthread_mutexattr_settype pthread_mutexattr_setkind_np)
+
+      # Look for sched_yield.  Up to Solaris 2.6, it is in libposix4, since
+      # Solaris 7 the name librt is preferred.
+      AC_CHECK_FUNCS(sched_yield, , [
+	AC_CHECK_LIB(rt, sched_yield, [
+	  AC_DEFINE(HAVE_SCHED_YIELD)
+	  THREADLIBS="$THREADLIBS -lrt"
+	  THREADSPEC="$THREADSPEC -lrt"], [
+	  AC_CHECK_LIB(posix4, sched_yield, [
+	    AC_DEFINE(HAVE_SCHED_YIELD)
+	    THREADLIBS="$THREADLIBS -lposix4"
+	    THREADSPEC="$THREADSPEC -lposix4"])])])
+
+      AC_CHECK_LIB(rt, clock_gettime, [
+         AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if you have clock_gettime()])
+	 case "$THREADSPEC" in
+	   *-lrt*) ;;
+	   *)
+ 	     THREADSPEC="$THREADSPEC -lrt"
+	     THREADLIBS="$THREADLIBS -lrt"
+	     ;;
+	 esac])
+
+      LIBS="$save_LIBS"
+
+      # We can save a little space at runtime if the mutex has m_count
+      # or __m_count.  This is a nice hack for Linux.
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [[
+          extern pthread_mutex_t *mutex; int q = mutex->m_count;
+        ]])], AC_DEFINE(PTHREAD_MUTEX_HAVE_M_COUNT, 1,
+             [Define if pthread_mutex_t has m_count member.]), [
+	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [[
+	    extern pthread_mutex_t *mutex; int q = mutex->__m_count;
+	  ]])], AC_DEFINE(PTHREAD_MUTEX_HAVE___M_COUNT, 1,
+            [Define if pthread_mutex_t has __m_count member.]))])
+   fi
+
+   # We require a way to get the time.
+   time_found=no
+   AC_CHECK_FUNCS(gettimeofday time ftime, time_found=yes)
+   if test "$time_found" = no; then
+      AC_MSG_ERROR([no function found to get the time])
+   fi
+
+   AC_CHECK_FUNCS(memmove)
+
+   # We require memcpy.
+   memcpy_found=no
+   AC_CHECK_FUNCS(memcpy, memcpy_found=yes)
+   if test "$memcpy_found" = no; then
+      AC_MSG_ERROR([memcpy is required])
+   fi
+   # Do an additional check on dld, HP-UX for example has dlopen in libdld.sl
+   AC_CHECK_LIB(dl, dlopen, [
+       AC_DEFINE(HAVE_DLOPEN, 1, [Define if dlopen is available])], [
+       AC_CHECK_LIB(dld, dlopen, [
+       AC_DEFINE(HAVE_DLOPEN, 1, [Define if dlopen is available])])])
+
+   # Some library-finding code we stole from Tcl.
+   #--------------------------------------------------------------------
+   #	Check for the existence of the -lsocket and -lnsl libraries.
+   #	The order here is important, so that they end up in the right
+   #	order in the command line generated by make.  Here are some
+   #	special considerations:
+   #	1. Use "connect" and "accept" to check for -lsocket, and
+   #	   "gethostbyname" to check for -lnsl.
+   #	2. Use each function name only once:  can't redo a check because
+   #	   autoconf caches the results of the last check and won't redo it.
+   #	3. Use -lnsl and -lsocket only if they supply procedures that
+   #	   aren't already present in the normal libraries.  This is because
+   #	   IRIX 5.2 has libraries, but they aren't needed and they're
+   #	   bogus:  they goof up name resolution if used.
+   #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
+   #	   To get around this problem, check for both libraries together
+   #	   if -lsocket doesn't work by itself.
+   #--------------------------------------------------------------------
+
+   AC_CACHE_CHECK([for socket libraries], gcj_cv_lib_sockets,
+    [gcj_cv_lib_sockets=
+     gcj_checkBoth=0
+     unset ac_cv_func_connect
+     AC_CHECK_FUNC(connect, gcj_checkSocket=0, gcj_checkSocket=1)
+     if test "$gcj_checkSocket" = 1; then
+	 unset ac_cv_func_connect
+	 AC_CHECK_LIB(socket, main, gcj_cv_lib_sockets="-lsocket",
+		      gcj_checkBoth=1)
+     fi
+     if test "$gcj_checkBoth" = 1; then
+	 gcj_oldLibs=$LIBS
+	 LIBS="$LIBS -lsocket -lnsl"
+	 unset ac_cv_func_accept
+	 AC_CHECK_FUNC(accept,
+		       [gcj_checkNsl=0
+			gcj_cv_lib_sockets="-lsocket -lnsl"])
+	 unset ac_cv_func_accept
+	 LIBS=$gcj_oldLibs
+     fi
+     unset ac_cv_func_gethostbyname
+     gcj_oldLibs=$LIBS
+     LIBS="$LIBS $gcj_cv_lib_sockets"
+     AC_CHECK_FUNC(gethostbyname, ,
+		   [AC_CHECK_LIB(nsl, main,
+				 [gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"])])
+     unset ac_cv_func_gethostbyname
+     LIBS=$gcj_oldLIBS
+   ])
+   SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
+
+   if test "$with_system_zlib" = yes; then
+      AC_CHECK_LIB(z, deflate, ZLIBSPEC=-lz, ZLIBSPEC=)
+   fi
+
+   # Test for Gtk stuff, if asked for.
+   if test "$use_gtk_awt" = yes; then
+      PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4)
+      AC_SUBST(GTK_CFLAGS)
+      AC_SUBST(GTK_LIBS)
+
+      PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.4 gthread-2.0 >= 2.4)
+      AC_SUBST(GLIB_CFLAGS)
+      AC_SUBST(GLIB_LIBS)
+
+      PKG_CHECK_MODULES(LIBART, libart-2.0 >= 2.1)
+      AC_SUBST(LIBART_CFLAGS)
+      AC_SUBST(LIBART_LIBS)
+
+      # We require the XTest Extension to support java.awt.Robot.
+      AC_CHECK_LIB([Xtst], [XTestQueryExtension], [true],
+		   [AC_MSG_ERROR([libXtst not found, required by java.awt.Robot])],
+		   [${X_LIBS}])
+   fi
+
+   # On Solaris, and maybe other architectures, the Boehm collector
+   # requires -ldl.
+   if test "$GC" = boehm; then
+      AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl")
+   fi
+fi
+
+# Use a semicolon as CLASSPATH separator for MinGW, otherwise a colon.
+case $build in
+    *-mingw32) CLASSPATH_SEPARATOR=';' ;;
+    *)         CLASSPATH_SEPARATOR=':' ;;
+esac
+AC_SUBST(CLASSPATH_SEPARATOR)
+
+# We must search the source tree for java.lang, since we still don't
+# have libgcj.jar nor java/lang/*.class
+GCJ_SAVE_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS -I`${PWDCMD-pwd}` -I`cd $srcdir && ${PWDCMD-pwd}`"
+
+# Since some classes depend on this one, we need its source available
+# before we can do any GCJ compilation test :-(
+if test ! -f gnu/classpath/Configuration.java; then
+  test -d gnu || mkdir gnu
+  test -d gnu/classpath || mkdir gnu/classpath
+  # Note that it is not crucial that all the values here be correct.
+  sed -e "s, at prefix@,$prefix," \
+      -e "s, at VERSION@,$VERSION," \
+      -e "s, at LIBDEBUG@,false," \
+      -e "s, at INIT_LOAD_LIBRARY@,false," \
+      -e "s,@@,$LIBGCJDEBUG," \
+      -e "s, at default_toolkit@,$TOOLKIT," \
+      -e "s, at JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@,false," \
+      -e "s, at GTK_CAIRO_ENABLED@,false," \
+	< $srcdir/classpath/gnu/classpath/Configuration.java.in \
+	> gnu/classpath/Configuration.java
+  # We do not want to redirect the output of the grep below to /dev/null,
+  # but we add /dev/null to the input list so that grep will print the
+  # filename of Configuration.java in case it finds any matches.
+  if grep '@.*@' gnu/classpath/Configuration.java /dev/null; then
+    AC_MSG_ERROR([configure.ac is missing the substitutions above])
+  fi
+fi
+
+LT_AC_PROG_GCJ
+
+# Now remove it.
+rm -f gnu/classpath/Configuration.java
+
+CPPFLAGS=$GCJ_SAVE_CPPFLAGS
+
+AC_CHECK_SIZEOF(void *)
+
+AC_C_BIGENDIAN
+
+ZLIBS=
+SYS_ZLIBS=
+ZINCS=
+
+if test -z "$ZLIBSPEC"; then
+   # Use zlib from the GCC tree.
+   ZINCS='-I$(top_srcdir)/../zlib'
+   ZLIBS=../zlib/libzgcj_convenience.la
+else
+   # System's zlib.
+   SYS_ZLIBS="$ZLIBSPEC"
+fi
+AC_SUBST(ZLIBS)
+AC_SUBST(SYS_ZLIBS)
+AC_SUBST(ZINCS)
+AC_SUBST(DIVIDESPEC)
+AC_SUBST(CHECKREFSPEC)
+AC_SUBST(EXCEPTIONSPEC)
+AC_SUBST(BACKTRACESPEC)
+AC_SUBST(IEEESPEC)
+
+AM_CONDITIONAL(NATIVE, test "$NATIVE" = yes)
+AM_CONDITIONAL(NEEDS_DATA_START, test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes)
+AC_SUBST(GCC_UNWIND_INCLUDE)
+
+# Process the option "--enable-version-specific-runtime-libs"
+# Calculate toolexeclibdir
+case ${version_specific_libs} in
+  yes)
+    # Need the gcc compiler version to know where to install libraries
+    # and header files if --enable-version-specific-runtime-libs option
+    # is selected.
+    includedir='$(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include/'
+    toolexecdir='$(libdir)/gcc/$(target_noncanonical)'
+    toolexecmainlibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
+    toolexeclibdir=$toolexecmainlibdir
+    ;;
+  no)
+    if test -n "$with_cross_host" &&
+       test x"$with_cross_host" != x"no"; then
+      # Install a library built with a cross compiler in tooldir, not libdir.
+      toolexecdir='$(exec_prefix)/$(target_noncanonical)'
+      toolexecmainlibdir='$(toolexecdir)/lib'
+    else
+      toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
+      toolexecmainlibdir='$(libdir)'
+    fi
+    multi_os_directory=`$CC -print-multi-os-directory`
+    case $multi_os_directory in
+      .) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /.
+      *) toolexeclibdir=$toolexecmainlibdir/$multi_os_directory ;;
+    esac
+    ;;
+esac
+AC_SUBST(toolexecdir)
+AC_SUBST(toolexecmainlibdir)
+AC_SUBST(toolexeclibdir)
+
+# Determine where the standard .db file and GNU Classpath JNI
+# libraries are found.
+multi_os_directory=`$CC -print-multi-os-directory`
+case $multi_os_directory in
+  .)
+   dbexecdir='$(libdir)/gcj-$(gcc_version)' # Avoid /.
+   ;;
+  *)
+   dbexecdir='$(libdir)/'$multi_os_directory'/gcj-$(gcc_version)'
+   ;;
+esac
+AC_SUBST(dbexecdir)
+
+# Determine gcj version number.
+gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([[^ ]]*\).*$/\1/p'`
+GCJVERSION=$gcjversion
+AC_SUBST(GCJVERSION)
+AC_DEFINE_UNQUOTED(GCJVERSION, "$GCJVERSION", [Short GCJ version ID])
+
+AC_DEFINE(JV_VERSION, "1.4.2", [Compatibility version string])
+AC_DEFINE(JV_API_VERSION, "1.4", [API compatibility version string])
+
+TL_AC_GXX_INCLUDE_DIR
+
+# We check for sys/filio.h because Solaris 2.5 defines FIONREAD there.
+# On that system, sys/ioctl.h will not include sys/filio.h unless
+# BSD_COMP is defined; just including sys/filio.h is simpler.
+# We avoid AC_HEADER_DIRENT since we really only care about dirent.h
+# for now.  If you change this, you also must update natFile.cc.
+AC_CHECK_HEADERS([unistd.h bstring.h sys/time.h sys/types.h fcntl.h \
+		  sys/ioctl.h sys/filio.h sys/stat.h sys/select.h \
+		  sys/socket.h netinet/in.h arpa/inet.h netdb.h net/if.h \
+		  pwd.h sys/config.h stdint.h langinfo.h locale.h \
+		  dirent.h sys/rw_lock.h ifaddrs.h])
+AC_CHECK_HEADERS(inttypes.h, [
+    AC_DEFINE(HAVE_INTTYPES_H, 1, [Define if <inttypes.h> is available])
+    AC_DEFINE(JV_HAVE_INTTYPES_H, 1, [Define if <inttypes.h> is available])
+])
+AC_HEADER_SYS_WAIT
+
+AC_CHECK_TYPE([ssize_t], [int])
+
+AC_MSG_CHECKING([for in_addr_t])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif]], [[in_addr_t foo;]])],
+  [AC_DEFINE(HAVE_IN_ADDR_T, 1,
+     [Define to 1 if 'in_addr_t' is defined in sys/types.h or netinet/in.h.])
+   AC_MSG_RESULT(yes)],
+  [AC_MSG_RESULT(no)])
+
+AC_MSG_CHECKING([whether struct ip_mreq is in netinet/in.h])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>]], [[struct ip_mreq mreq;]])],
+  [AC_DEFINE(HAVE_STRUCT_IP_MREQ, 1,
+     [Define if struct ip_mreq is defined in netinet/in.h.])
+   AC_MSG_RESULT(yes)],
+  [AC_MSG_RESULT(no)])
+
+AC_MSG_CHECKING([whether struct ipv6_mreq is in netinet/in.h])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>]], [[struct ipv6_mreq mreq6;]])],
+  [AC_DEFINE(HAVE_STRUCT_IPV6_MREQ, 1,
+     [Define if struct ipv6_mreq is defined in netinet/in.h.])
+   AC_MSG_RESULT(yes)],
+  [AC_MSG_RESULT(no)])
+
+AC_MSG_CHECKING([whether struct sockaddr_in6 is in netinet/in.h])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>]], [[struct sockaddr_in6 addr6;]])],
+  [AC_DEFINE(HAVE_INET6, 1,
+     [Define if inet6 structures are defined in netinet/in.h.])
+   AC_MSG_RESULT(yes)],
+  [AC_MSG_RESULT(no)])
+
+AC_MSG_CHECKING([for socklen_t in sys/socket.h])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _POSIX_PII_SOCKET
+#include <sys/types.h>
+#include <sys/socket.h>]], [[socklen_t x = 5;]])],
+  [AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define it socklen_t typedef is in sys/socket.h.])
+   AC_MSG_RESULT(yes)],
+  [AC_MSG_RESULT(no)])
+
+AC_MSG_CHECKING([for tm_gmtoff in struct tm])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[struct tm tim; tim.tm_gmtoff = 0;]])],
+  [AC_DEFINE(STRUCT_TM_HAS_GMTOFF, 1, [Define if struct tm has tm_gmtoff field.])
+   AC_MSG_RESULT(yes)],
+  [AC_MSG_RESULT(no)
+   AC_MSG_CHECKING([for global timezone variable])
+   dnl FIXME: we don't want a link check here because that won't work
+   dnl when cross-compiling.  So instead we make an assumption that
+   dnl the header file will mention timezone if it exists.
+   dnl Don't find the win32 function timezone
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[void i(){long z2 = 2*timezone;}]])],
+     [AC_DEFINE(HAVE_TIMEZONE, 1, [Define if global 'timezone' exists.])
+      AC_MSG_RESULT(yes)],
+     [AC_MSG_RESULT(no)
+       AC_MSG_CHECKING([for global _timezone variable])
+       dnl FIXME: As above, don't want link check
+       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[long z2 = _timezone;]])],
+         [AC_DEFINE(HAVE_UNDERSCORE_TIMEZONE, 1,
+            [Define if your platform has the global _timezone variable.])
+          AC_MSG_RESULT(yes)],
+          [AC_MSG_RESULT(no)])])])
+
+AC_FUNC_ALLOCA
+
+AC_CHECK_PROGS(PERL, perl, false)
+
+SYSDEP_SOURCES=
+SIGNAL_HANDLER_AUX=
+
+case "${host}" in
+ i?86-*-linux*)
+    SIGNAL_HANDLER=include/i386-signal.h
+    ;;
+ sparc*-sun-solaris*)
+    SIGNAL_HANDLER=include/sparc-signal.h
+    ;;
+# ia64-*)
+#    SYSDEP_SOURCES=sysdep/ia64.c
+#    test -d sysdep || mkdir sysdep
+#    ;;
+ hppa*-*-linux*)
+    SIGNAL_HANDLER=include/pa-signal.h
+    ;;
+ hppa*-hp-hpux*)
+    SIGNAL_HANDLER=include/hppa-signal.h
+    ;;
+ ia64-*-linux*)
+    SIGNAL_HANDLER=include/dwarf2-signal.h
+    ;;
+ powerpc*-*-linux*)
+    SIGNAL_HANDLER=include/powerpc-signal.h
+    ;;
+ alpha*-*-linux*)
+    SIGNAL_HANDLER=include/dwarf2-signal.h
+    ;;
+ s390*-*-linux*)
+    SIGNAL_HANDLER=include/s390-signal.h
+    ;;
+ x86_64*-*-linux*)
+    SIGNAL_HANDLER=include/x86_64-signal.h
+    SIGNAL_HANDLER_AUX=include/i386-signal.h
+    ;;
+ sparc*-*-linux*)
+    SIGNAL_HANDLER=include/dwarf2-signal.h
+    ;;
+ sh*-*-linux*)
+    SIGNAL_HANDLER=include/sh-signal.h
+    ;;
+ *mingw*)
+    SIGNAL_HANDLER=include/win32-signal.h
+    ;;
+ mips*-*-linux*)
+    SIGNAL_HANDLER=include/mips-signal.h
+    ;;
+ powerpc*-*-darwin*)
+    SIGNAL_HANDLER=include/darwin-signal.h
+    ;;
+ *)
+    SIGNAL_HANDLER=include/default-signal.h
+    ;;
+esac
+
+# If we're using sjlj exceptions, forget what we just learned.
+if test "$enable_sjlj_exceptions" = yes; then
+   SIGNAL_HANDLER=include/default-signal.h
+   SIGNAL_HANDLER_AUX=
+fi
+
+AC_SUBST(SYSDEP_SOURCES)
+
+if test -z "$SIGNAL_HANDLER_AUX"; then
+  SIGNAL_HANDLER_AUX=$SIGNAL_HANDLER
+fi
+
+AC_CONFIG_LINKS(include/java-signal.h:$SIGNAL_HANDLER
+		include/java-signal-aux.h:$SIGNAL_HANDLER_AUX)
+
+if test "${multilib}" = "yes"; then
+  multilib_arg="--enable-multilib"
+else
+  multilib_arg=
+fi
+
+# See if we support thread-local storage.
+GCC_CHECK_TLS
+
+# For _Unwind_GetIPInfo.
+GCC_CHECK_UNWIND_GETIPINFO
+
+# Check if linker supports static linking on a per library basis
+LD_START_STATIC_SPEC=
+LD_FINISH_STATIC_SPEC=
+if $LD --help 2>&1 | grep -q -e -call_shared ; then
+  if $LD --help 2>&1 | grep -q -e -non_shared ; then
+    LD_START_STATIC_SPEC='%{static-libgcj:-non_shared}'
+    LD_FINISH_STATIC_SPEC='%{static-libgcj:-call_shared}'
+  fi
+fi
+AC_SUBST(LD_START_STATIC_SPEC)
+AC_SUBST(LD_FINISH_STATIC_SPEC)
+
+here=`${PWDCMD-pwd}`
+AC_SUBST(here)
+
+# We get this from the environment.
+AC_SUBST(GCJFLAGS)
+
+AC_CONFIG_FILES([
+Makefile
+libgcj.pc
+libgcj.spec
+libgcj-test.spec
+gcj/Makefile
+include/Makefile
+testsuite/Makefile
+])
+
+AC_CONFIG_FILES([scripts/jar], [chmod +x scripts/jar])
+
+AC_CONFIG_COMMANDS([default],
+[# Only add multilib support code if we just rebuilt top-level Makefile.
+case " $CONFIG_FILES " in
+ *" Makefile "*)
+   LD="${ORIGINAL_LD_FOR_MULTILIBS}"
+   ac_file=Makefile . ${multi_basedir}/./libjava/../config-ml.in
+   ;;
+esac
+for ac_multi_file in $CONFIG_FILES; do
+  case $ac_multi_file in
+  */Makefile)
+    grep "^MULTI[[^ ]]* =" Makefile >> "$ac_multi_file" ;;
+  esac
+done
+],
+srcdir=${srcdir}
+host=${host}
+target=${target}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="${multilib_arg} ${ac_configure_args}"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+multi_basedir=${multi_basedir}
+CC="${CC}"
+CXX="${CXX}"
+ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
+)
+
+AC_OUTPUT

Added: llvm-gcc-4.2/trunk/libjava/configure.host
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/configure.host?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/configure.host (added)
+++ llvm-gcc-4.2/trunk/libjava/configure.host Thu Nov  8 16:56:19 2007
@@ -0,0 +1,342 @@
+# configure.host
+
+# This shell script handles all host based configuration for libgcj.
+# It sets various shell variables based on the the host and the
+# configuration options.  You can modify this shell script without
+# needing to rerun autoconf.
+
+# This shell script should be invoked as
+#   . configure.host
+# If it encounters an error, it will exit with a message.
+
+# It uses the following shell variables:
+#   host		The configuration host
+#   host_cpu		The configuration host CPU
+#   target_optspace	--enable-target-optspace ("yes", "no", "")
+
+# It sets the following shell variables:
+#   libgcj_cflags	Special CFLAGS to use when building
+#   libgcj_cxxflags	Special CXXFLAGS to use when building
+#   libgcj_javaflags	Special JAVAFLAGS to use when building
+#   libgcj_interpreter  If the bytecode interpreter supports this platform.
+#   enable_java_net_default  If java.net native code should be enabled by
+#                            default.
+#   enable_hash_synchronization_default  If hash synchronization should be
+#                                        enabled by default.
+#   sysdeps_dir		Directory containing system-dependent headers
+#   slow_pthread_self   The synchronization code should try to avoid 
+#			pthread_self calls by caching thread IDs in a hashtable
+#   can_unwind_signal   Set to "yes" if the EH unwinder supports throwing
+#			from a signal handler.
+#   fallback_backtrace_h  Header to use for fallback backtrace implementation
+#			  (only for targets that don't support DWARF2 unwind)
+#   descriptor_h	Header to use for looking past function descriptors
+#   use_libgcj_bc	Whether to build a "libgcj-bc" library for BC-ABI
+#			binaries to link against.
+
+libgcj_flags=
+libgcj_cflags=
+libgcj_cxxflags=
+libgcj_javaflags=
+libgcj_interpreter=
+enable_java_net_default=yes
+enable_hash_synchronization_default=no
+sysdeps_dir=generic
+slow_pthread_self=
+can_unwind_signal=no
+fallback_backtrace_h=sysdep/generic/backtrace.h
+
+case "${target_optspace}:${host}" in
+  yes:*)
+    libgcj_flags="${libgcj_flags} -Os"
+    ;;
+  :m32r-* | :d10v-* | :d30v-*)
+    libgcj_flags="${libgcj_flags} -Os"
+    ;;
+  no:* | :*)
+    # Nothing.
+    ;;
+esac
+
+AM_RUNTESTFLAGS= 
+
+# Set any host dependent compiler flags.
+# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
+
+echo "$target"
+
+DIVIDESPEC=-fuse-divide-subroutine
+EXCEPTIONSPEC=-fnon-call-exceptions
+CHECKREFSPEC=
+BACKTRACESPEC=
+
+# This case statement supports per-CPU defaults.
+case "${host}" in
+  arm*-elf | strongarm*-elf | xscale*-elf)
+	with_libffi_default=no
+	PROCESS=Ecos
+	FILE=Posix
+	CHECKREFSPEC=-fcheck-references
+	EXCEPTIONSPEC=
+	enable_java_net_default=no
+	enable_getenv_properties_default=no
+	enable_main_args_default=no
+	;;
+  mips-tx39-*|mipstx39-unknown-*)
+	libgcj_flags="${libgcj_flags} -G 0"
+	LDFLAGS="$LDFLAGS -Tjmr3904dram.ld"
+	AM_RUNTESTFLAGS="--target_board=jmr3904-sim"	
+	# Use "Ecos" processes since they are a no-op.
+	PROCESS=Ecos
+	FILE=Posix
+ 	enable_java_net_default=no
+ 	enable_getenv_properties_default=no
+	;;
+  mipsel-*|mips-*)
+	libgcj_interpreter=yes
+	;;
+  i686-*|i586-*|i486-*|i386-*)
+	sysdeps_dir=i386
+	# With -fomit-frame-pointer -maccumulate-outgoing-args (implied),
+	# the .text section of libgcj.so is 30k larger, and the .eh_frame
+	# section is 1.4M smaller.
+	libgcj_flags="${libgcj_flags} -ffloat-store -fomit-frame-pointer"
+	libgcj_interpreter=yes
+	libgcj_cxxflags=
+	libgcj_cflags=
+	DIVIDESPEC=-fno-use-divide-subroutine
+	enable_hash_synchronization_default=yes
+	slow_pthread_self=yes
+	;;
+  x86_64-*)
+	sysdeps_dir=x86-64
+	# For 64-bit we always use SSE registers for arithmetic,
+	# which doesn't have the extra precision problems of the fpu.
+	# But be careful about 32-bit multilibs.
+	case " $CC " in
+	*" -m32 "*)
+		libgcj_flags="${libgcj_flags} -ffloat-store" ;;
+	esac
+	libgcj_flags="${libgcj_flags} -fomit-frame-pointer"
+	libgcj_cxxflags=
+	libgcj_cflags=
+	DIVIDESPEC=-fno-use-divide-subroutine
+	enable_hash_synchronization_default=yes
+	slow_pthread_self=yes
+	libgcj_interpreter=yes
+	;;
+  alpha*-*)
+	sysdeps_dir=alpha
+	libgcj_flags="${libgcj_flags} -mieee"
+	libgcj_interpreter=yes
+	enable_hash_synchronization_default=yes
+	IEEESPEC=-mieee
+	;;
+  hppa*-*)
+	sysdeps_dir=pa
+	libgcj_interpreter=yes
+	enable_hash_synchronization_default=no
+	;;
+  powerpc64*-*)
+	sysdeps_dir=powerpc
+	libgcj_interpreter=yes
+	if [ x`$CC -print-multi-os-directory` = x../lib64 ]; then
+	    libgcj_flags="${libgcj_flags} -mminimal-toc"
+	fi
+	enable_hash_synchronization_default=yes
+	slow_pthread_self=yes
+	;;
+  powerpc*-*)
+	sysdeps_dir=powerpc
+	libgcj_interpreter=yes
+	enable_hash_synchronization_default=yes
+	slow_pthread_self=yes
+	;;
+  s390*-*)
+	sysdeps_dir=s390
+	libgcj_interpreter=yes
+	DIVIDESPEC=-fno-use-divide-subroutine
+	enable_hash_synchronization_default=yes
+	;;
+  sparc*-*)
+	libgcj_interpreter=yes
+        ;;
+  ia64-*)
+	sysdeps_dir=ia64
+        libgcj_flags="${libgcj_flags} -funwind-tables"
+	libgcj_interpreter=yes
+	enable_hash_synchronization_default=yes
+	;;
+  sh-* | sh[34]*-*)
+	sysdeps_dir=sh
+	libgcj_flags="${libgcj_flags} -mieee"
+	libgcj_interpreter=yes
+	enable_hash_synchronization_default=yes
+	IEEESPEC=-mieee
+	;;
+esac
+
+# This case statement supports generic port properties and may refine
+# the above per-CPU defaults.  Note: If your OS implements
+# MD_FALLBACK_FRAME_STATE_FOR, then you want to set can_unwind_signal
+# here.
+case "${host}" in
+  i[34567]86*-linux* | \
+  powerpc*-linux* | \
+  alpha*-linux* | \
+  s390*-linux* | \
+  sparc*-linux* | \
+  ia64-* | \
+  x86_64*-linux* | \
+  hppa*-linux* | \
+  sh-linux* | sh[34]*-linux*)
+  	can_unwind_signal=yes
+	libgcj_ld_symbolic='-Wl,-Bsymbolic'
+	if test x$slow_pthread_self = xyes \
+	   && test x$cross_compiling != xyes; then
+	  cat > conftest.c <<EOF
+#define _GNU_SOURCE 1
+#include <pthread.h>
+#include <stdlib.h>
+#include <sys/resource.h>
+#include <limits.h>
+
+void *
+tf (void *arg __attribute__ ((unused)))
+{
+  pthread_attr_t a;
+  size_t s;
+
+  if (pthread_getattr_np (pthread_self (), &a)
+      || pthread_attr_getstacksize (&a, &s)
+      || s > 2 * PTHREAD_STACK_MIN)
+    exit (1);
+  exit (0);
+}
+
+int
+main (int argc, char **argv)
+{
+  pthread_t p;
+  void *ret;
+  struct rlimit r;
+
+  if (argc == 2)
+    {
+      r.rlim_cur = 2 * PTHREAD_STACK_MIN;
+      r.rlim_max = 2 * PTHREAD_STACK_MIN;
+      if (setrlimit (RLIMIT_STACK, &r))
+	exit (1);
+      execl (argv[1], argv[0], NULL);
+      exit (1);
+    }
+
+  if (pthread_create (&p, NULL, tf, NULL)
+      || pthread_join (p, &ret))
+    exit (1);
+  exit (1);
+}
+EOF
+	  $CC -o conftest conftest.c -lpthread > /dev/null 2>&1 && \
+	  ./conftest ./conftest && slow_pthread_self=
+	  rm -f conftest conftest.c
+	fi
+	;;
+   i[34567]86*-kfreebsd*-gnu | x86_64*-kfreebsd*-gnu)
+        libgcj_ld_symbolic='-Wl,-Bsymbolic'
+        slow_pthread_self=
+        ;;
+  i[34567]86-*-solaris2.1[0-9]* )
+	sysdeps_dir=x86-64
+	DIVIDESPEC=-f%{m32:no-}%{!m32:%{!m64:no-}}%{m64:}use-divide-subroutine
+	;;
+  mips*-*-linux* )
+  	sysdeps_dir=mips
+  	can_unwind_signal=yes
+	DIVIDESPEC=-fno-use-divide-subroutine
+	case "${host}" in
+	    mipsel*-linux* | mipsisa32el*-linux*)
+		enable_hash_synchronization_default=yes
+	    ;;
+	esac
+	;;
+  powerpc*-*-darwin*)
+	enable_hash_synchronization_default=yes
+	slow_pthread_self=
+	can_unwind_signal=yes
+	;;
+  i?86-*-darwin*)
+	enable_hash_synchronization_default=yes
+	slow_pthread_self=
+	can_unwind_signal=no
+	;;
+  *-*-freebsd*)
+	slow_pthread_self=
+	;;
+  *-mingw*)
+        libgcj_flags="${libgcj_flags} -fno-omit-frame-pointer"
+  	# FIXME: win32_exception_handler( ) in win32.cc does not do the
+	# right stuff yet w.r.t. SEH. Live with the following for now.
+	can_unwind_signal=no
+	CHECKREFSPEC=-fcheck-references
+	DIVIDESPEC=-fuse-divide-subroutine
+	;;
+  *-cygwin*)
+  	# The cygwin linker doesn't do 8-byte alignment by default, so
+	# disable hash synchronization for now.
+	enable_hash_synchronization_default=no
+	slow_pthread_self=
+	;;
+  hppa*-hp-hpux11.*)
+	slow_pthread_self=no
+	can_unwind_signal=yes
+	DIVIDESPEC=-fuse-divide-subroutine
+	;;
+esac
+
+case "${host}" in
+  *-cygwin* | *-mingw*)
+	fallback_backtrace_h=sysdep/i386/backtrace.h  
+	# We need a frame pointer on Windows, so override BACKTRACESPEC
+  	BACKTRACESPEC=
+  ;;
+esac
+
+case "${host}" in
+  ia64-*)
+	descriptor_h=sysdep/descriptor-y.h
+	;;
+
+  hppa*64*-*-hpux*)
+	descriptor_h=sysdep/pa/descriptor-pa64-hpux.h
+	;;
+
+  hppa*-*-hpux*)
+	descriptor_h=sysdep/pa/descriptor-pa32-hpux.h
+	;;
+
+  hppa*-*)
+	descriptor_h=sysdep/pa/descriptor.h
+	;;
+
+  rs6000-* | powerpc*-*)
+	descriptor_h=sysdep/powerpc/descriptor.h
+	;;
+
+  *)
+	descriptor_h=sysdep/descriptor-n.h
+	;;
+esac
+
+case "${host}" in
+  *linux*|*-kfreebsd*-gnu)
+    use_libgcj_bc=yes
+  ;;
+  *)
+    use_libgcj_bc=no
+  ;;
+esac    
+
+libgcj_cflags="${libgcj_cflags} ${libgcj_flags}"
+libgcj_cxxflags="${libgcj_cxxflags} ${libgcj_flags}"
+libgcj_javaflags="${libgcj_javaflags} ${libgcj_flags}"

Added: llvm-gcc-4.2/trunk/libjava/darwin.cc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/darwin.cc?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/darwin.cc (added)
+++ llvm-gcc-4.2/trunk/libjava/darwin.cc Thu Nov  8 16:56:19 2007
@@ -0,0 +1,63 @@
+/* darwin.cc - class loader stuff for Darwin.  */
+
+/* Copyright (C) 2004  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#include <config.h>
+
+#include <jvm.h>
+
+/* In theory, we should be able to do:
+   #include <mach-o/getsect.h>
+   #include <mach-o/dyld.h>
+
+   but all the types in these headers changed between Panther and Tiger,
+   so the only way to be avoid type mismatches is to declare the routines
+   ourself.  */
+
+#include <stdint.h>
+struct mach_header;
+extern "C" void _dyld_register_func_for_add_image
+  (void (*func)(const struct mach_header *mh, intptr_t vmaddr_slide));
+extern "C" void _dyld_register_func_for_remove_image
+  (void (*func)(const struct mach_header *mh, intptr_t vmaddr_slide));
+extern "C" char *getsectdatafromheader
+(const struct mach_header *mhp, const char *segname, const char *sectname,
+ uint32_t *size);
+
+/* When a new image is loaded, look to see if it has a jcr section
+   and if so register the classes listed in it.  */
+
+static void
+darwin_java_register_dyld_add_image_hook (const struct mach_header *mh,
+					  intptr_t slide)
+{
+  char *fde;
+  uint32_t sz;
+
+  fde = getsectdatafromheader (mh, "__DATA", "jcr", &sz);
+  if (! fde)
+    return;
+  
+  /* As far as I can tell, you're only supposed to load shared
+     libraries while having a lock on java.lang.Class.  So there's
+     no need to synchronize on anything here.  (I'm not sure how exactly
+     you can ensure this given lazy library loading.  FIXME.)  */
+ 
+  _Jv_RegisterClasses_Counted ((const jclass *) (fde + slide),
+			       sz / sizeof (jclass *));
+}
+
+static struct darwin_constructor_s{
+  darwin_constructor_s() 
+  {
+    _dyld_register_func_for_add_image 
+      (darwin_java_register_dyld_add_image_hook);
+    /* At present, you mustn't unload any java plugin.  */
+  };
+} darwin_constructor;

Added: llvm-gcc-4.2/trunk/libjava/defineclass.cc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/defineclass.cc?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/defineclass.cc (added)
+++ llvm-gcc-4.2/trunk/libjava/defineclass.cc Thu Nov  8 16:56:19 2007
@@ -0,0 +1,1730 @@
+// defineclass.cc - defining a class from .class format.
+
+/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+/* 
+   Author: Kresten Krab Thorup <krab at gnu.org> 
+
+   Written using the online versions of Java Language Specification (1st
+   ed.) and The Java Virtual Machine Specification (2nd ed.). 
+
+   Future work may include reading (and handling) attributes which are
+   currently being ignored ("InnerClasses", "LineNumber", etc...).  
+*/
+
+#include <config.h>
+
+#include <java-interp.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <java-cpool.h>
+#include <gcj/cni.h>
+#include <execution.h>
+
+#include <java/lang/Class.h>
+#include <java/lang/Float.h>
+#include <java/lang/Double.h>
+#include <java/lang/Character.h>
+#include <java/lang/LinkageError.h>
+#include <java/lang/InternalError.h>
+#include <java/lang/ClassFormatError.h>
+#include <java/lang/NoClassDefFoundError.h>
+#include <java/lang/ClassCircularityError.h>
+#include <java/lang/IncompatibleClassChangeError.h>
+#include <java/lang/reflect/Modifier.h>
+#include <java/security/ProtectionDomain.h>
+
+using namespace gcj;
+
+#ifdef INTERPRETER
+
+// these go in some separate functions, to avoid having _Jv_InitClass
+// inserted all over the place.
+static void throw_internal_error (const char *msg)
+	__attribute__ ((__noreturn__));
+static void throw_no_class_def_found_error (jstring msg)
+	__attribute__ ((__noreturn__));
+static void throw_no_class_def_found_error (const char *msg)
+	__attribute__ ((__noreturn__));
+static void throw_class_format_error (jstring msg)
+	__attribute__ ((__noreturn__));
+static void throw_incompatible_class_change_error (jstring msg)
+	__attribute__ ((__noreturn__));
+static void throw_class_circularity_error (jstring msg)
+	__attribute__ ((__noreturn__));
+
+/**
+ * We define class reading using a class.  It is practical, since then
+ * the entire class-reader can be a friend of class Class (it needs to
+ * write all it's different structures); but also because this makes it
+ * easy to make class definition reentrant, and thus two threads can be
+ * defining classes at the same time.   This class (_Jv_ClassReader) is
+ * never exposed outside this file, so we don't have to worry about
+ * public or private members here.
+ */
+
+struct _Jv_ClassReader
+{
+
+  // do verification?  Currently, there is no option to disable this.
+  // This flag just controls the verificaiton done by the class loader;
+  // i.e., checking the integrity of the constant pool; and it is
+  // allways on.  You always want this as far as I can see, but it also
+  // controls weither identifiers and type descriptors/signatures are
+  // verified as legal.  This could be somewhat more expensive since it
+  // will call Character.isJavaIdentifier{Start,Part} for each character
+  // in any identifier (field name or method name) it comes by.  Thus,
+  // it might be useful to turn off this verification for classes that
+  // come from a trusted source.  However, for GCJ, trusted classes are
+  // most likely to be linked in.
+
+  bool verify;
+
+  // input data.
+  unsigned char     *bytes;
+  int                len;
+
+  // current input position
+  int                pos;
+
+  // the constant pool data
+  int pool_count;
+  unsigned char     *tags;
+  unsigned int      *offsets;
+
+  // the class to define (see java-interp.h)
+  jclass	   def;
+
+  // the classes associated interpreter data.
+  _Jv_InterpClass  *def_interp;
+
+  // The name we found.
+  _Jv_Utf8Const **found_name;
+
+  // True if this is a 1.5 class file.
+  bool             is_15;
+
+
+  /* check that the given number of input bytes are available */
+  inline void check (int num)
+  {
+    if (pos + num > len)
+      throw_class_format_error ("Premature end of data");
+  }
+
+  /* skip a given number of bytes in input */
+  inline void skip (int num)
+  {
+    check (num);
+    pos += num;
+  }
+  
+  /* read an unsignend 1-byte unit */
+  inline static jint get1u (unsigned char* bytes)
+  {
+    return bytes[0];
+  }
+  
+  /* read an unsigned 1-byte unit */
+  inline jint read1u ()
+  {
+    skip (1);
+    return get1u (bytes+pos-1);
+  }
+  
+  /* read an unsigned 2-byte unit */
+  inline static jint get2u (unsigned char *bytes)
+  {
+    return (((jint)bytes[0]) << 8) | ((jint)bytes[1]);
+  }
+  
+  /* read an unsigned 2-byte unit */
+  inline jint read2u ()
+  {
+    skip (2);  
+    return get2u (bytes+pos-2);
+  }
+  
+  /* read a 4-byte unit */
+  static jint get4 (unsigned char *bytes)
+  {
+    return (((jint)bytes[0]) << 24)
+         | (((jint)bytes[1]) << 16)
+         | (((jint)bytes[2]) << 8)
+         | (((jint)bytes[3]) << 0);
+  }
+
+  /* read a 4-byte unit, (we don't do that quite so often) */
+  inline jint read4 ()
+  {
+    skip (4);  
+    return get4 (bytes+pos-4);
+  }
+
+  /* read a 8-byte unit */
+  static jlong get8 (unsigned char* bytes)
+  {
+    return (((jlong)bytes[0]) << 56)
+         | (((jlong)bytes[1]) << 48)
+         | (((jlong)bytes[2]) << 40)
+         | (((jlong)bytes[3]) << 32) 
+         | (((jlong)bytes[4]) << 24)
+         | (((jlong)bytes[5]) << 16)
+         | (((jlong)bytes[6]) << 8)
+         | (((jlong)bytes[7]) << 0);
+  }
+
+  /* read a 8-byte unit */
+  inline jlong read8 ()
+  {
+    skip (8);  
+    return get8 (bytes+pos-8);
+  }
+
+  inline void check_tag (int index, char expected_tag)
+  {
+    if (index < 0
+	|| index > pool_count
+	|| tags[index] != expected_tag)
+      throw_class_format_error ("erroneous constant pool tag");
+  }
+
+  inline void verify_identifier (_Jv_Utf8Const* name)
+  {
+    if (! _Jv_VerifyIdentifier (name))
+      throw_class_format_error ("erroneous identifier");
+  }
+
+  inline void verify_classname (unsigned char* ptr, _Jv_ushort length)
+  {
+    if (! _Jv_VerifyClassName (ptr, length))
+      throw_class_format_error ("erroneous class name");
+  }
+
+  inline void verify_classname (_Jv_Utf8Const *name)
+  {
+    if (! _Jv_VerifyClassName (name))
+      throw_class_format_error ("erroneous class name");
+  }
+
+  inline void verify_field_signature (_Jv_Utf8Const *sig)
+  {
+    if (! _Jv_VerifyFieldSignature (sig))
+      throw_class_format_error ("erroneous type descriptor");
+  }
+
+  inline void verify_method_signature (_Jv_Utf8Const *sig)
+  {
+    if (! _Jv_VerifyMethodSignature (sig))
+      throw_class_format_error ("erroneous type descriptor");
+  }
+
+  _Jv_ClassReader (jclass klass, jbyteArray data, jint offset, jint length,
+		   java::security::ProtectionDomain *pd,
+		   _Jv_Utf8Const **name_result)
+  {
+    if (klass == 0 || length < 0 || offset+length > data->length)
+      throw_internal_error ("arguments to _Jv_DefineClass");
+
+    verify = true;
+    bytes  = (unsigned char*) (elements (data)+offset);
+    len    = length;
+    pos    = 0;
+    is_15  = false;
+
+    def    = klass;
+    found_name = name_result;
+
+    def->size_in_bytes = -1;
+    def->vtable_method_count = -1;
+    def->engine = &_Jv_soleInterpreterEngine;
+    def->protectionDomain = pd;
+  }
+
+  /** and here goes the parser members defined out-of-line */
+  void parse ();
+  void read_constpool ();
+  void prepare_pool_entry (int index, unsigned char tag);
+  void read_fields ();
+  void read_methods ();
+  void read_one_class_attribute ();
+  void read_one_method_attribute (int method);
+  void read_one_code_attribute (int method);
+  void read_one_field_attribute (int field);
+  void throw_class_format_error (const char *msg);
+
+  /** check an utf8 entry, without creating a Utf8Const object */
+  bool is_attribute_name (int index, const char *name);
+
+  /** here goes the class-loader members defined out-of-line */
+  void handleConstantPool ();
+  void handleClassBegin (int, int, int);
+  void handleInterfacesBegin (int);
+  void handleInterface (int, int);
+  void handleFieldsBegin (int);
+  void handleField (int, int, int, int);
+  void handleFieldsEnd ();
+  void handleConstantValueAttribute (int,int);
+  void handleMethodsBegin (int);
+  void handleMethod (int, int, int, int);
+  void handleMethodsEnd ();
+  void handleCodeAttribute (int, int, int, int, int, int);
+  void handleExceptionTableEntry (int, int, int, int, int, int);
+
+  void checkExtends (jclass sub, jclass super);
+  void checkImplements (jclass sub, jclass super);
+
+  /*
+   * FIXME: we should keep a hash table of utf8-strings, since many will
+   * be the same.  It's a little tricky, however, because the hash table
+   * needs to interact gracefully with the garbage collector.  Much
+   * memory is to be saved by this, however!  perhaps the improvement
+   * could be implemented in prims.cc (_Jv_makeUtf8Const), since it
+   * computes the hash value anyway.
+   */
+};
+
+// Note that *NAME_RESULT will only be set if the class is registered
+// with the class loader.  This is how the caller can know whether
+// unregistration is require.
+void
+_Jv_DefineClass (jclass klass, jbyteArray data, jint offset, jint length,
+		 java::security::ProtectionDomain *pd,
+		 _Jv_Utf8Const **name_result)
+{
+  _Jv_ClassReader reader (klass, data, offset, length, pd, name_result);
+  reader.parse();
+
+  /* that's it! */
+}
+
+
+/** This section defines the parsing/scanning of the class data */
+
+// Major and minor version numbers for various releases.
+#define MAJOR_1_1 45
+#define MINOR_1_1  3
+#define MAJOR_1_2 46
+#define MINOR_1_2  0
+#define MAJOR_1_3 47
+#define MINOR_1_3  0
+#define MAJOR_1_4 48
+#define MINOR_1_4  0
+#define MAJOR_1_5 49
+#define MINOR_1_5  0
+
+void
+_Jv_ClassReader::parse ()
+{
+  int magic = read4 ();
+  if (magic != (int) 0xCAFEBABE)
+    throw_class_format_error ("bad magic number");
+
+  int minor_version = read2u ();
+  int major_version = read2u ();
+  if (major_version < MAJOR_1_1 || major_version > MAJOR_1_5
+      || (major_version == MAJOR_1_5 && minor_version > MINOR_1_5))
+    throw_class_format_error ("unrecognized class file version");
+  is_15 = (major_version == MAJOR_1_5);
+
+  pool_count = read2u ();
+
+  read_constpool ();
+
+  int access_flags = read2u ();
+  int this_class = read2u ();
+  int super_class = read2u ();
+
+  check_tag (this_class, JV_CONSTANT_Class);
+  if (super_class != 0) 
+    check_tag (super_class, JV_CONSTANT_Class);
+
+  handleClassBegin (access_flags, this_class, super_class);
+
+  // Allocate our aux_info here, after the name is set, to fulfill our
+  // contract with the collector interface.
+  def->aux_info = (void *) _Jv_AllocRawObj (sizeof (_Jv_InterpClass));
+  def_interp = (_Jv_InterpClass *) def->aux_info;
+
+  int interfaces_count = read2u (); 
+
+  handleInterfacesBegin (interfaces_count);
+
+  for (int i = 0; i < interfaces_count; i++)
+    {
+      int iface = read2u ();
+      check_tag (iface, JV_CONSTANT_Class);
+      handleInterface (i, iface);
+    }
+  
+  read_fields ();
+  read_methods ();
+  
+  int attributes_count = read2u ();
+  
+  for (int i = 0; i < attributes_count; i++)
+    {
+      read_one_class_attribute ();
+    }
+
+  if (pos != len)
+    throw_class_format_error ("unused data before end of file");
+
+  // Tell everyone we're done.
+  def->state = JV_STATE_READ;
+  if (gcj::verbose_class_flag)
+    _Jv_Linker::print_class_loaded (def);
+  def->notifyAll ();
+}
+
+void _Jv_ClassReader::read_constpool ()
+{
+  tags    = (unsigned char*) _Jv_AllocBytes (pool_count);
+  offsets = (unsigned int *) _Jv_AllocBytes (sizeof (int) * pool_count) ;
+
+  /** first, we scan the constant pool, collecting tags and offsets */
+  tags[0]   = JV_CONSTANT_Undefined;
+  offsets[0] = pos;
+  for (int c = 1; c < pool_count; c++)
+    {
+      tags[c]    = read1u ();
+      offsets[c] = pos;
+
+      switch (tags[c])
+	{
+	case JV_CONSTANT_String:
+	case JV_CONSTANT_Class:
+	  skip (2);
+	  break;
+
+	case JV_CONSTANT_Fieldref:
+	case JV_CONSTANT_Methodref:
+	case JV_CONSTANT_InterfaceMethodref:
+	case JV_CONSTANT_NameAndType:
+	case JV_CONSTANT_Integer:
+	case JV_CONSTANT_Float:
+	  skip (4);
+	  break;
+
+	case JV_CONSTANT_Double:
+	case JV_CONSTANT_Long:
+	  skip (8);
+	  tags[++c] = JV_CONSTANT_Undefined;
+	  break;
+	    
+	case JV_CONSTANT_Utf8:
+	  {		    
+	    int len = read2u ();
+	    skip (len);
+	  }
+	  break;
+
+	case JV_CONSTANT_Unicode:
+	  throw_class_format_error ("unicode not supported");
+	  break;
+
+	default:
+	  throw_class_format_error ("erroneous constant pool tag");
+	}
+    }
+
+  handleConstantPool ();
+}
+
+
+void _Jv_ClassReader::read_fields ()
+{
+  int fields_count = read2u ();
+  handleFieldsBegin (fields_count);
+
+  for (int i = 0; i < fields_count; i++)
+    {
+      int access_flags     = read2u ();
+      int name_index       = read2u ();
+      int descriptor_index = read2u ();
+      int attributes_count = read2u ();
+
+      check_tag (name_index, JV_CONSTANT_Utf8);
+      prepare_pool_entry (name_index, JV_CONSTANT_Utf8);
+
+      check_tag (descriptor_index, JV_CONSTANT_Utf8);
+      prepare_pool_entry (descriptor_index, JV_CONSTANT_Utf8);
+
+      handleField (i, access_flags, name_index, descriptor_index);
+
+      for (int j = 0; j < attributes_count; j++)
+	{
+	  read_one_field_attribute (i);
+	}
+    }
+
+  handleFieldsEnd ();
+}
+
+bool
+_Jv_ClassReader::is_attribute_name (int index, const char *name)
+{
+  check_tag (index, JV_CONSTANT_Utf8);
+  int len = get2u (bytes+offsets[index]);
+  if (len != (int) strlen (name))
+    return false;
+  else
+    return !memcmp (bytes+offsets[index]+2, name, len);
+}
+
+void _Jv_ClassReader::read_one_field_attribute (int field_index)
+{
+  int name = read2u ();
+  int length = read4 ();
+
+  if (is_attribute_name (name, "ConstantValue"))
+    {
+      int cv = read2u ();
+
+      if (cv < pool_count 
+	  && cv > 0
+	  && (tags[cv] == JV_CONSTANT_Integer
+	      || tags[cv] == JV_CONSTANT_Float
+	      || tags[cv] == JV_CONSTANT_Long
+	      || tags[cv] == JV_CONSTANT_Double
+	      || tags[cv] == JV_CONSTANT_String))
+	  {
+	    handleConstantValueAttribute (field_index, cv);
+	  }
+	else
+	  {
+	    throw_class_format_error ("erroneous ConstantValue attribute");
+	  }
+
+	if (length != 2) 
+	  throw_class_format_error ("erroneous ConstantValue attribute");
+      }
+
+    else
+      {
+	skip (length);
+      }
+}
+
+void _Jv_ClassReader::read_methods ()
+{
+  int methods_count = read2u ();
+  
+  handleMethodsBegin (methods_count);
+  
+  for (int i = 0; i < methods_count; i++)
+    {
+      int access_flags     = read2u ();
+      int name_index       = read2u ();
+      int descriptor_index = read2u ();
+      int attributes_count = read2u ();
+      
+      check_tag (name_index, JV_CONSTANT_Utf8);
+      prepare_pool_entry (name_index, JV_CONSTANT_Utf8);
+
+      check_tag (descriptor_index, JV_CONSTANT_Utf8);
+      prepare_pool_entry (descriptor_index, JV_CONSTANT_Utf8);
+
+      handleMethod (i, access_flags, name_index,
+		    descriptor_index);
+
+      for (int j = 0; j < attributes_count; j++)
+	{
+	  read_one_method_attribute (i);
+	}
+    }
+  
+  handleMethodsEnd ();
+}
+
+void _Jv_ClassReader::read_one_method_attribute (int method_index) 
+{
+  int name = read2u ();
+  int length = read4 ();
+
+  if (is_attribute_name (name, "Exceptions"))
+    {
+      _Jv_Method *method = reinterpret_cast<_Jv_Method *>
+	(&def->methods[method_index]);
+      if (method->throws != NULL)
+	throw_class_format_error ("only one Exceptions attribute allowed per method");
+
+      int num_exceptions = read2u ();
+      _Jv_Utf8Const **exceptions =
+	(_Jv_Utf8Const **) _Jv_AllocBytes ((num_exceptions + 1)
+					   * sizeof (_Jv_Utf8Const *));
+
+      int out = 0;
+      _Jv_word *pool_data = def->constants.data;
+      for (int i = 0; i < num_exceptions; ++i)
+	{
+	  int ndx = read2u ();
+	  // JLS 2nd Ed. 4.7.5 requires that the tag not be 0.
+	  if (ndx != 0)
+	    {
+	      check_tag (ndx, JV_CONSTANT_Class);
+	      exceptions[out++] = pool_data[ndx].utf8; 
+	    }
+	}
+      exceptions[out] = NULL;
+      method->throws = exceptions;
+    }
+
+  else if (is_attribute_name (name, "Code"))
+    {
+      int start_off = pos;
+      int max_stack = read2u ();
+      int max_locals = read2u ();
+      int code_length = read4 ();
+
+      int code_start = pos;
+      skip (code_length);
+      int exception_table_length = read2u ();
+
+      handleCodeAttribute (method_index, 
+			   max_stack, max_locals,
+			   code_start, code_length,
+			   exception_table_length);
+      
+
+      for (int i = 0; i < exception_table_length; i++)
+	{
+	  int start_pc   = read2u ();
+	  int end_pc     = read2u ();
+	  int handler_pc = read2u ();
+	  int catch_type = read2u ();
+
+	  if (start_pc > end_pc
+	      || start_pc < 0
+	      // END_PC can be equal to CODE_LENGTH.
+	      // See JVM Spec 4.7.4.
+	      || end_pc > code_length
+	      || handler_pc >= code_length)
+	    throw_class_format_error ("erroneous exception handler info");
+
+	  if (! (tags[catch_type] == JV_CONSTANT_Class
+		 || tags[catch_type] == 0))
+	    {
+	      throw_class_format_error ("erroneous exception handler info");
+	    }
+
+	  handleExceptionTableEntry (method_index,
+				     i,
+				     start_pc,
+				     end_pc,
+				     handler_pc, 
+				     catch_type);
+
+	}
+
+      int attributes_count = read2u ();
+
+      for (int i = 0; i < attributes_count; i++)
+	{
+	  read_one_code_attribute (method_index);
+	}
+
+      if ((pos - start_off) != length)
+	throw_class_format_error ("code attribute too short");
+    }
+
+  else
+    {
+      /* ignore unknown attributes */
+      skip (length);
+    }
+}
+
+void _Jv_ClassReader::read_one_code_attribute (int method_index) 
+{
+  int name = read2u ();
+  int length = read4 ();
+  if (is_attribute_name (name, "LineNumberTable"))
+    {
+      _Jv_InterpMethod *method = reinterpret_cast<_Jv_InterpMethod *>
+	(def_interp->interpreted_methods[method_index]);
+      if (method->line_table != NULL)
+	throw_class_format_error ("Method already has LineNumberTable");
+
+      int table_len = read2u ();
+      _Jv_LineTableEntry* table
+	= (_Jv_LineTableEntry *) _Jv_AllocBytes (table_len
+						 * sizeof (_Jv_LineTableEntry));
+      for (int i = 0; i < table_len; i++)
+       {
+	 table[i].bytecode_pc = read2u ();
+	 table[i].line = read2u ();
+       }
+      method->line_table_len = table_len;
+      method->line_table = table;
+    }
+  else
+    {
+      /* ignore unknown code attributes */
+      skip (length);
+    }
+}
+
+void _Jv_ClassReader::read_one_class_attribute () 
+{
+  int name = read2u ();
+  int length = read4 ();
+  if (is_attribute_name (name, "SourceFile"))
+    {
+      int source_index = read2u ();
+      check_tag (source_index, JV_CONSTANT_Utf8);
+      prepare_pool_entry (source_index, JV_CONSTANT_Utf8);
+      def_interp->source_file_name = _Jv_NewStringUtf8Const
+	(def->constants.data[source_index].utf8);
+    }
+  else
+    {
+      /* Currently, we ignore most class attributes.
+         FIXME: Add inner-classes attributes support. */
+     skip (length);
+    }
+}
+
+
+
+
+/* this section defines the semantic actions of the parser */
+
+void _Jv_ClassReader::handleConstantPool ()
+{
+  /** now, we actually define the class' constant pool */
+
+  jbyte *pool_tags = (jbyte*) _Jv_AllocBytes (pool_count);
+  _Jv_word *pool_data
+    = (_Jv_word*) _Jv_AllocRawObj (pool_count * sizeof (_Jv_word));
+
+  def->constants.tags = pool_tags;
+  def->constants.data = pool_data;
+  def->constants.size = pool_count;
+
+  // Here we make a pass to collect the strings!   We do this, because
+  // internally in the GCJ runtime, classes are encoded with .'s not /'s. 
+  // Therefore, we first collect the strings, and then translate the rest
+  // of the utf8-entries (thus not representing strings) from /-notation
+  // to .-notation.
+  for (int i = 1; i < pool_count; i++)
+    {
+      if (tags[i] == JV_CONSTANT_String)
+	{
+	  unsigned char* str_data = bytes + offsets [i];
+	  int utf_index = get2u (str_data);
+	  check_tag (utf_index, JV_CONSTANT_Utf8);
+	  unsigned char *utf_data = bytes + offsets[utf_index];
+	  int len = get2u (utf_data);
+	  pool_data[i].utf8 = _Jv_makeUtf8Const ((char*)(utf_data+2), len);
+	  pool_tags[i] = JV_CONSTANT_String;
+	}
+      else
+	{
+	  pool_tags[i] = JV_CONSTANT_Undefined;
+	}
+    }
+
+  // and now, we scan everything else but strings & utf8-entries.  This
+  // leaves out those utf8-entries which are not used; which will be left
+  // with a tag of JV_CONSTANT_Undefined in the class definition.
+  for (int index = 1; index < pool_count; index++)
+    {
+      switch (tags[index])
+	{
+	case JV_CONSTANT_Undefined:
+	case JV_CONSTANT_String:
+	case JV_CONSTANT_Utf8:
+	  continue;
+	  
+	default:
+	  prepare_pool_entry (index, tags[index]);
+	}
+    }  
+  
+}
+
+/* this is a recursive procedure, which will prepare pool entries as needed.
+   Which is how we avoid initializing those entries which go unused. */
+void
+_Jv_ClassReader::prepare_pool_entry (int index, unsigned char this_tag)
+{
+  /* these two, pool_data and pool_tags, point into the class
+     structure we are currently defining */
+
+  unsigned char *pool_tags = (unsigned char*) def->constants.tags;
+  _Jv_word      *pool_data = def->constants.data;
+
+  /* this entry was already prepared */
+  if (pool_tags[index] == this_tag)
+    return;
+
+  /* this_data points to the constant-pool information for the current
+     constant-pool entry */
+
+  unsigned char *this_data = bytes + offsets[index];
+
+  switch (this_tag)
+    {
+    case JV_CONSTANT_Utf8: 
+      {
+	// If we came here, it is because some other tag needs this
+	// utf8-entry for type information!  Thus, we translate /'s to .'s in
+	// order to accomondate gcj's internal representation.
+
+	int len = get2u (this_data);
+	char *buffer = (char*) __builtin_alloca (len);
+	char *s = ((char*) this_data)+2;
+
+	/* FIXME: avoid using a buffer here */
+	for (int i = 0; i < len; i++)
+	  {
+	    if (s[i] == '/')
+	      buffer[i] = '.';
+	    else
+	      buffer[i] = (char) s[i];
+	  }
+	
+	pool_data[index].utf8 = _Jv_makeUtf8Const (buffer, len);
+	pool_tags[index] = JV_CONSTANT_Utf8;
+      }
+      break;
+	    
+    case JV_CONSTANT_Class:      
+      {
+	int utf_index = get2u (this_data);
+	check_tag (utf_index, JV_CONSTANT_Utf8);
+	prepare_pool_entry (utf_index, JV_CONSTANT_Utf8);
+
+	if (verify)
+	  verify_classname (pool_data[utf_index].utf8);
+		
+	pool_data[index].utf8 = pool_data[utf_index].utf8;
+	pool_tags[index] = JV_CONSTANT_Class;
+      }
+      break;
+	    
+    case JV_CONSTANT_String:
+      // already handled before... 
+      break;
+	    
+    case JV_CONSTANT_Fieldref:
+    case JV_CONSTANT_Methodref:
+    case JV_CONSTANT_InterfaceMethodref:
+      {
+	int class_index = get2u (this_data);
+	int nat_index = get2u (this_data+2);
+
+	check_tag (class_index, JV_CONSTANT_Class);
+	prepare_pool_entry (class_index, JV_CONSTANT_Class);	    
+
+	check_tag (nat_index, JV_CONSTANT_NameAndType);
+	prepare_pool_entry (nat_index, JV_CONSTANT_NameAndType);
+
+	// here, verify the signature and identifier name
+	if (verify)
+	{
+	  _Jv_ushort name_index, type_index;
+	  _Jv_loadIndexes (&pool_data[nat_index],
+			   name_index, type_index);
+
+	  if (this_tag == JV_CONSTANT_Fieldref)
+	    verify_field_signature (pool_data[type_index].utf8);
+	  else
+	    verify_method_signature (pool_data[type_index].utf8);
+
+	  _Jv_Utf8Const* name = pool_data[name_index].utf8;
+
+	  if (this_tag != JV_CONSTANT_Fieldref
+	      && (   _Jv_equalUtf8Consts (name, clinit_name)
+		  || _Jv_equalUtf8Consts (name, init_name)))
+	    /* ignore */;
+	  else
+	    verify_identifier (pool_data[name_index].utf8);
+	}
+	    
+	_Jv_storeIndexes (&pool_data[index], class_index, nat_index);
+	pool_tags[index] = this_tag;
+      }
+      break;
+	    
+    case JV_CONSTANT_NameAndType:
+      {
+	_Jv_ushort name_index = get2u (this_data);
+	_Jv_ushort type_index = get2u (this_data+2);
+
+	check_tag (name_index, JV_CONSTANT_Utf8);
+	prepare_pool_entry (name_index, JV_CONSTANT_Utf8);	    
+
+	check_tag (type_index, JV_CONSTANT_Utf8);
+	prepare_pool_entry (type_index, JV_CONSTANT_Utf8);
+
+	_Jv_storeIndexes (&pool_data[index], name_index, type_index);
+	pool_tags[index] = JV_CONSTANT_NameAndType;
+      }
+      break;
+	    
+    case JV_CONSTANT_Float:
+      {
+	jfloat f = java::lang::Float::intBitsToFloat ((jint) get4 (this_data));
+	_Jv_storeFloat (&pool_data[index], f);
+	pool_tags[index] = JV_CONSTANT_Float;
+      }
+      break;
+	    
+    case JV_CONSTANT_Integer:
+      {
+	int i = get4 (this_data);
+	_Jv_storeInt (&pool_data[index], i);
+	pool_tags[index] = JV_CONSTANT_Integer;
+      }
+      break;
+	    
+    case JV_CONSTANT_Double:
+      {
+	jdouble d
+	  = java::lang::Double::longBitsToDouble ((jlong) get8 (this_data));
+	_Jv_storeDouble (&pool_data[index], d);
+	pool_tags[index] = JV_CONSTANT_Double;
+      }
+      break;
+	    
+    case JV_CONSTANT_Long:
+      {
+	jlong i = get8 (this_data);
+	_Jv_storeLong (&pool_data[index], i);
+	pool_tags[index] = JV_CONSTANT_Long;
+      }
+      break;
+	    
+    default:
+      throw_class_format_error ("erroneous constant pool tag");
+    }
+}
+
+
+void
+_Jv_ClassReader::handleClassBegin (int access_flags, int this_class, int super_class)
+{
+  using namespace java::lang::reflect;
+
+  unsigned char *pool_tags = (unsigned char*) def->constants.tags;
+  _Jv_word      *pool_data = def->constants.data;
+
+  check_tag (this_class, JV_CONSTANT_Class);
+  _Jv_Utf8Const *loadedName = pool_data[this_class].utf8;
+
+  // was ClassLoader.defineClass called with an expected class name?
+  if (def->name == 0)
+    {
+      jclass orig = def->loader->findLoadedClass(loadedName->toString());
+
+      if (orig == 0)
+	{
+	  def->name = loadedName;
+	}
+      else
+	{
+	  jstring msg = JvNewStringUTF ("anonymous "
+					"class data denotes "
+					"existing class ");
+	  msg = msg->concat (orig->getName ());
+
+	  throw_no_class_def_found_error (msg);
+	}
+    }
+
+  // assert that the loaded class has the expected name, 5.3.5
+  else if (! _Jv_equalUtf8Consts (loadedName, def->name))
+    {
+      jstring msg = JvNewStringUTF ("loaded class ");
+      msg = msg->concat (def->getName ());
+      msg = msg->concat (_Jv_NewStringUTF (" was in fact named "));
+      jstring klass_name = loadedName->toString();
+      msg = msg->concat (klass_name);
+
+      throw_no_class_def_found_error (msg);
+    }
+
+  def->accflags = access_flags | java::lang::reflect::Modifier::INTERPRETED;
+  pool_data[this_class].clazz = def;
+  pool_tags[this_class] = JV_CONSTANT_ResolvedClass;
+
+  if (super_class == 0)
+    {
+      // Note that this is ok if we are defining java.lang.Object.
+      // But there is no way to have this class be interpreted.
+      throw_class_format_error ("no superclass reference");
+    }
+
+  def->state = JV_STATE_PRELOADING;
+
+  // Register this class with its defining loader as well (despite the
+  // name of the function we're calling), so that super class lookups
+  // work properly.  If there is an error, our caller will unregister
+  // this class from the class loader.  Also, we don't need to hold a
+  // lock here, as our caller has acquired it.
+  _Jv_RegisterInitiatingLoader (def, def->loader);
+
+  // Note that we found a name so that unregistration can happen if
+  // needed.
+  *found_name = def->name;
+
+  if (super_class != 0)
+    {
+      // Load the superclass.
+      check_tag (super_class, JV_CONSTANT_Class);
+      _Jv_Utf8Const* super_name = pool_data[super_class].utf8; 
+
+      // Load the superclass using our defining loader.
+      jclass the_super = _Jv_FindClass (super_name, def->loader);
+
+      // This will establish that we are allowed to be a subclass,
+      // and check for class circularity error.
+      checkExtends (def, the_super);
+
+      // Note: for an interface we will find Object as the
+      // superclass.  We still check it above to ensure class file
+      // validity, but we simply assign `null' to the actual field in
+      // this case.
+      def->superclass = (((access_flags & Modifier::INTERFACE))
+			 ? NULL : the_super);
+      pool_data[super_class].clazz = the_super;
+      pool_tags[super_class] = JV_CONSTANT_ResolvedClass;
+    }
+
+  // Now we've come past the circularity problem, we can 
+  // now say that we're loading.
+
+  def->state = JV_STATE_LOADING;
+  def->notifyAll ();
+}
+
+///// Implements the checks described in sect. 5.3.5.3
+void
+_Jv_ClassReader::checkExtends (jclass sub, jclass super)
+{
+  using namespace java::lang::reflect;
+
+  _Jv_Linker::wait_for_state (super, JV_STATE_LOADING);
+
+  // Having an interface or a final class as a superclass is no good.
+  if ((super->accflags & (Modifier::INTERFACE | Modifier::FINAL)) != 0)
+    {
+      throw_incompatible_class_change_error (sub->getName ());
+    }
+
+  // If the super class is not public, we need to check some more.
+  if ((super->accflags & Modifier::PUBLIC) == 0)
+    {
+      // With package scope, the classes must have the same class
+      // loader.
+      if (   sub->loader != super->loader
+	  || !_Jv_ClassNameSamePackage (sub->name, super->name))
+	{
+	  throw_incompatible_class_change_error (sub->getName ());
+	}
+    } 
+
+  for (; super != 0; super = super->getSuperclass ())
+    {
+      if (super == sub)
+	throw_class_circularity_error (sub->getName ());
+    }
+}
+
+
+
+void _Jv_ClassReader::handleInterfacesBegin (int count)
+{
+  def->interfaces = (jclass*) _Jv_AllocRawObj (count*sizeof (jclass));
+  def->interface_count = count;
+}
+
+void _Jv_ClassReader::handleInterface (int if_number, int offset)
+{
+  _Jv_word       * pool_data = def->constants.data;
+  unsigned char  * pool_tags = (unsigned char*) def->constants.tags;
+
+  jclass the_interface;
+
+  if (pool_tags[offset] == JV_CONSTANT_Class)
+    {
+      _Jv_Utf8Const* name = pool_data[offset].utf8;
+      the_interface =  _Jv_FindClass (name, def->loader);
+    }
+  else if (pool_tags[offset] == JV_CONSTANT_ResolvedClass)
+    {
+      the_interface = pool_data[offset].clazz;
+    }
+  else
+    {
+      throw_no_class_def_found_error ("erroneous constant pool tag");
+    }
+
+  // checks the validity of the_interface, and that we are in fact
+  // allowed to implement that interface.
+  checkImplements (def, the_interface);
+  
+  pool_data[offset].clazz = the_interface;
+  pool_tags[offset] = JV_CONSTANT_ResolvedClass;
+  
+  def->interfaces[if_number] = the_interface;
+}
+
+void
+_Jv_ClassReader::checkImplements (jclass sub, jclass super)
+{
+  using namespace java::lang::reflect;
+
+  // well, it *must* be an interface
+  if ((super->accflags & Modifier::INTERFACE) == 0)
+    {
+      throw_incompatible_class_change_error (sub->getName ());
+    }
+
+  // if it has package scope, it must also be defined by the 
+  // same loader.
+  if ((super->accflags & Modifier::PUBLIC) == 0)
+    {
+      if (    sub->loader != super->loader
+	  || !_Jv_ClassNameSamePackage (sub->name, super->name))
+	{
+	  throw_incompatible_class_change_error (sub->getName ());
+	}
+    } 
+
+  // FIXME: add interface circularity check here
+  if (sub == super)
+    {
+      throw_class_circularity_error (sub->getName ());
+    }		
+}
+
+void _Jv_ClassReader::handleFieldsBegin (int count)
+{
+  def->fields = (_Jv_Field*) _Jv_AllocRawObj (count * sizeof (_Jv_Field));
+  def->field_count = count;
+  def_interp->field_initializers
+    = (_Jv_ushort*) _Jv_AllocRawObj (count * sizeof (_Jv_ushort));
+  for (int i = 0; i < count; i++)
+    def_interp->field_initializers[i] = (_Jv_ushort) 0;
+}
+
+void _Jv_ClassReader::handleField (int field_no,
+				   int flags,
+				   int name,
+				   int desc)
+{
+  using namespace java::lang::reflect;
+
+  _Jv_word *pool_data = def->constants.data;
+
+  _Jv_Field *field = &def->fields[field_no];
+  _Jv_Utf8Const *field_name = pool_data[name].utf8;
+
+  field->name      = field_name;
+
+  // Ignore flags we don't know about.  
+  field->flags = flags & Modifier::ALL_FLAGS;
+
+  _Jv_Utf8Const* sig = pool_data[desc].utf8;
+
+  if (verify)
+    {
+      verify_identifier (field_name);
+
+      for (int i = 0; i < field_no; ++i)
+	{
+	  if (_Jv_equalUtf8Consts (field_name, def->fields[i].name)
+	      && _Jv_equalUtf8Consts (sig,
+				      // We know the other fields are
+				      // unresolved.
+				      (_Jv_Utf8Const *) def->fields[i].type))
+	    throw_class_format_error ("duplicate field name");
+	}
+
+      // At most one of PUBLIC, PRIVATE, or PROTECTED is allowed.
+      if (1 < ( ((field->flags & Modifier::PUBLIC) ? 1 : 0)
+		+((field->flags & Modifier::PRIVATE) ? 1 : 0)
+		+((field->flags & Modifier::PROTECTED) ? 1 : 0)))
+	throw_class_format_error ("erroneous field access flags");
+
+      // FIXME: JVM spec S4.5: Verify ACC_FINAL and ACC_VOLATILE are not 
+      // both set. Verify modifiers for interface fields.
+      
+    }
+
+  if (verify)
+    verify_field_signature (sig);
+
+  // field->type is really a jclass, but while it is still
+  // unresolved we keep an _Jv_Utf8Const* instead.
+  field->type       = (jclass) sig;
+  field->flags     |= _Jv_FIELD_UNRESOLVED_FLAG;
+  field->u.boffset  = 0;
+}
+
+
+void _Jv_ClassReader::handleConstantValueAttribute (int field_index, 
+						    int value)
+{
+  using namespace java::lang::reflect;
+
+  _Jv_Field *field = &def->fields[field_index];
+
+  if ((field->flags & (Modifier::STATIC
+		       | Modifier::FINAL
+		       | Modifier::PRIVATE)) == 0)
+    {
+      // Ignore, as per vmspec #4.7.2
+      return;
+    }
+
+  // do not allow multiple constant fields!
+  if (field->flags & _Jv_FIELD_CONSTANT_VALUE)
+    throw_class_format_error ("field has multiple ConstantValue attributes");
+
+  field->flags |= _Jv_FIELD_CONSTANT_VALUE;
+  def_interp->field_initializers[field_index] = value;
+
+  /* type check the initializer */
+  
+  if (value <= 0 || value >= pool_count)
+    throw_class_format_error ("erroneous ConstantValue attribute");
+
+  /* FIXME: do the rest */
+}
+
+void _Jv_ClassReader::handleFieldsEnd ()
+{
+  using namespace java::lang::reflect;
+
+  // We need to reorganize the fields so that the static ones are first,
+  // to conform to GCJ class layout.
+
+  int low            = 0;
+  int high           = def->field_count-1;
+  _Jv_Field  *fields = def->fields;
+  _Jv_ushort *inits  = def_interp->field_initializers;
+
+  // this is kind of a raw version of quicksort.
+  while (low < high)
+    {
+      // go forward on low, while it's a static
+      while (low < high && (fields[low].flags & Modifier::STATIC) != 0)
+	low++;
+      
+      // go backwards on high, while it's a non-static
+      while (low < high && (fields[high].flags & Modifier::STATIC) == 0)
+	high--;
+
+      if (low==high)
+	break;
+
+      _Jv_Field  tmp  = fields[low];
+      _Jv_ushort itmp = inits[low];
+	  
+      fields[low] = fields[high];
+      inits[low]  = inits[high];
+	  
+      fields[high] = tmp;
+      inits[high]  = itmp;
+	  
+      high -= 1;
+      low  += 1;
+    }
+  
+  if ((fields[low].flags & Modifier::STATIC) != 0) 
+    low += 1;
+
+  def->static_field_count = low;
+}
+
+
+
+void
+_Jv_ClassReader::handleMethodsBegin (int count)
+{
+  def->methods = (_Jv_Method *) _Jv_AllocRawObj (sizeof (_Jv_Method) * count);
+
+  def_interp->interpreted_methods
+    = (_Jv_MethodBase **) _Jv_AllocRawObj (sizeof (_Jv_MethodBase *)
+					   * count);
+
+  for (int i = 0; i < count; i++)
+    {
+      def_interp->interpreted_methods[i] = 0;
+      def->methods[i].index = (_Jv_ushort) -1;
+    }
+
+  def->method_count = count;
+}
+
+
+void _Jv_ClassReader::handleMethod 
+    (int mth_index, int accflags, int name, int desc)
+{ 
+  using namespace java::lang::reflect;
+
+  _Jv_word *pool_data = def->constants.data;
+  _Jv_Method *method = &def->methods[mth_index];
+
+  check_tag (name, JV_CONSTANT_Utf8);
+  prepare_pool_entry (name, JV_CONSTANT_Utf8);
+  method->name = pool_data[name].utf8;
+
+  check_tag (desc, JV_CONSTANT_Utf8);
+  prepare_pool_entry (desc, JV_CONSTANT_Utf8);
+  method->signature = pool_data[desc].utf8;
+
+  // ignore unknown flags
+  method->accflags = accflags & Modifier::ALL_FLAGS;
+
+  // Initialize...
+  method->ncode = 0;
+  method->throws = NULL;
+  
+  if (verify)
+    {
+      if (_Jv_equalUtf8Consts (method->name, clinit_name)
+	  || _Jv_equalUtf8Consts (method->name, init_name))
+	/* ignore */;
+      else
+	verify_identifier (method->name);
+
+      verify_method_signature (method->signature);
+
+      for (int i = 0; i < mth_index; ++i)
+	{
+	  if (_Jv_equalUtf8Consts (method->name, def->methods[i].name)
+	      && _Jv_equalUtf8Consts (method->signature,
+				      def->methods[i].signature))
+	    throw_class_format_error ("duplicate method");
+	}
+
+      // At most one of PUBLIC, PRIVATE, or PROTECTED is allowed.
+      if (1 < ( ((method->accflags & Modifier::PUBLIC) ? 1 : 0)
+		+((method->accflags & Modifier::PRIVATE) ? 1 : 0)
+		+((method->accflags & Modifier::PROTECTED) ? 1 : 0)))
+	throw_class_format_error ("erroneous method access flags");
+
+      // FIXME: JVM spec S4.6: if ABSTRACT modifier is set, verify other 
+      // flags are not set. Verify flags for interface methods.  Verify
+      // modifiers for initializers. 
+    }
+}
+
+void _Jv_ClassReader::handleCodeAttribute
+  (int method_index, int max_stack, int max_locals, 
+   int code_start, int code_length, int exc_table_length)
+{
+  int size = _Jv_InterpMethod::size (exc_table_length, code_length);
+  _Jv_InterpMethod *method = 
+    (_Jv_InterpMethod*) (_Jv_AllocRawObj (size));
+
+  method->max_stack      = max_stack;
+  method->max_locals     = max_locals;
+  method->code_length    = code_length;
+  method->exc_count      = exc_table_length;
+  method->is_15          = is_15;
+  method->defining_class = def;
+  method->self           = &def->methods[method_index];
+  method->prepared       = NULL;
+  method->line_table_len = 0;
+  method->line_table     = NULL;
+
+
+  // grab the byte code!
+  memcpy ((void*) method->bytecode (),
+	  (void*) (bytes+code_start),
+	  code_length);
+
+  def_interp->interpreted_methods[method_index] = method;
+
+  if ((method->self->accflags & java::lang::reflect::Modifier::STATIC))
+    {
+      // Precompute the ncode field for a static method.  This lets us
+      // call a static method of an interpreted class from precompiled
+      // code without first resolving the class (that will happen
+      // during class initialization instead).
+      method->self->ncode = method->ncode ();
+    }
+}
+
+void _Jv_ClassReader::handleExceptionTableEntry
+  (int method_index, int exc_index, 
+   int start_pc, int end_pc, int handler_pc, int catch_type)
+{
+  _Jv_InterpMethod *method = reinterpret_cast<_Jv_InterpMethod *>
+    (def_interp->interpreted_methods[method_index]);
+  _Jv_InterpException *exc = method->exceptions ();
+
+  exc[exc_index].start_pc.i     = start_pc;
+  exc[exc_index].end_pc.i       = end_pc;
+  exc[exc_index].handler_pc.i   = handler_pc;
+  exc[exc_index].handler_type.i = catch_type;
+}
+
+void _Jv_ClassReader::handleMethodsEnd ()
+{
+  using namespace java::lang::reflect;
+
+  for (int i = 0; i < def->method_count; i++)
+    {
+      _Jv_Method *method = &def->methods[i];
+      if ((method->accflags & Modifier::NATIVE) != 0)
+	{
+	  if (def_interp->interpreted_methods[i] != 0)
+	    throw_class_format_error ("code provided for native method");
+	  else
+	    {
+	      _Jv_JNIMethod *m = (_Jv_JNIMethod *)
+		_Jv_AllocRawObj (sizeof (_Jv_JNIMethod));
+	      m->defining_class = def;
+	      m->self = method;
+	      m->function = NULL;
+	      def_interp->interpreted_methods[i] = m;
+
+	      if ((method->accflags & Modifier::STATIC))
+		{
+		  // Precompute the ncode field for a static method.
+		  // This lets us call a static method of an
+		  // interpreted class from precompiled code without
+		  // first resolving the class (that will happen
+		  // during class initialization instead).
+		  method->ncode = m->ncode ();
+		}
+	    }
+	}
+      else if ((method->accflags & Modifier::ABSTRACT) != 0)
+	{
+	  if (def_interp->interpreted_methods[i] != 0)
+	    throw_class_format_error ("code provided for abstract method");
+	  method->ncode = (void *) &_Jv_ThrowAbstractMethodError;
+	}
+      else
+	{
+	  if (def_interp->interpreted_methods[i] == 0)
+	    throw_class_format_error ("method with no code");
+	}
+    }
+}
+
+void _Jv_ClassReader::throw_class_format_error (const char *msg)
+{
+  jstring str;
+  if (def->name != NULL)
+    {
+      jsize mlen = strlen (msg);
+      unsigned char* data = (unsigned char*) def->name->chars();
+      int ulen = def->name->len();
+      unsigned char* limit = data + ulen;
+      jsize nlen = _Jv_strLengthUtf8 ((char *) data, ulen);
+      jsize len = nlen + mlen + 3;
+      str = JvAllocString(len);
+      jchar *chrs = JvGetStringChars(str);
+      while (data < limit)
+	*chrs++ = UTF8_GET(data, limit);
+      *chrs++ = ' ';
+      *chrs++ = '(';
+      for (;;)
+	{
+	  char c = *msg++;
+	  if (c == 0)
+	    break;
+	  *chrs++ = c & 0xFFFF;
+	}
+      *chrs++ = ')';
+    }
+  else
+    str = JvNewStringLatin1 (msg);
+  ::throw_class_format_error (str);
+}
+
+/** Here we define the exceptions that can be thrown */
+
+static void
+throw_no_class_def_found_error (jstring msg)
+{
+  throw (msg
+	 ? new java::lang::NoClassDefFoundError (msg)
+	 : new java::lang::NoClassDefFoundError);
+}
+
+static void
+throw_no_class_def_found_error (const char *msg)
+{
+  throw_no_class_def_found_error (JvNewStringLatin1 (msg));
+}
+
+static void
+throw_class_format_error (jstring msg)
+{
+  throw (msg
+	 ? new java::lang::ClassFormatError (msg)
+	 : new java::lang::ClassFormatError);
+}
+
+static void
+throw_internal_error (const char *msg)
+{
+  throw new java::lang::InternalError (JvNewStringLatin1 (msg));
+}
+
+static void
+throw_incompatible_class_change_error (jstring msg)
+{
+  throw new java::lang::IncompatibleClassChangeError (msg);
+}
+
+static void
+throw_class_circularity_error (jstring msg)
+{
+  throw new java::lang::ClassCircularityError (msg);
+}
+
+#endif /* INTERPRETER */
+
+
+
+/** This section takes care of verifying integrity of identifiers,
+    signatures, field ddescriptors, and class names */
+
+#define UTF8_PEEK(PTR, LIMIT) \
+  ({ unsigned char* xxkeep = (PTR); \
+     int xxch = UTF8_GET(PTR,LIMIT); \
+     PTR = xxkeep; xxch; })
+
+/* Verify one element of a type descriptor or signature.  */
+static unsigned char*
+_Jv_VerifyOne (unsigned char* ptr, unsigned char* limit, bool void_ok)
+{
+  if (ptr >= limit)
+    return 0;
+
+  int ch = UTF8_GET (ptr, limit);
+
+  switch (ch)
+    {
+    case 'V':
+      if (! void_ok)
+	return 0;
+
+    case 'S': case 'B': case 'I': case 'J':
+    case 'Z': case 'C': case 'F': case 'D': 
+      break;
+
+    case 'L':
+      {
+	unsigned char *start = ptr, *end;
+	do
+	  {
+	    if (ptr > limit)
+	      return 0;
+
+	    end = ptr;
+
+	    if ((ch = UTF8_GET (ptr, limit)) == -1)
+	      return 0;
+
+	  }
+	while (ch != ';');
+	if (! _Jv_VerifyClassName (start, (unsigned short) (end-start)))
+	  return 0;
+      }
+      break;
+
+    case '[':
+      return _Jv_VerifyOne (ptr, limit, false);
+      break;
+
+    default:
+      return 0;
+    }
+
+  return ptr;
+}
+
+/* Verification and loading procedures.  */
+bool
+_Jv_VerifyFieldSignature (_Jv_Utf8Const*sig)
+{
+  unsigned char* ptr = (unsigned char*) sig->chars();
+  unsigned char* limit = ptr + sig->len();
+
+  ptr = _Jv_VerifyOne (ptr, limit, false);
+
+  return ptr == limit;
+}
+
+bool
+_Jv_VerifyMethodSignature (_Jv_Utf8Const*sig)
+{
+  unsigned char* ptr = (unsigned char*) sig->chars();
+  unsigned char* limit = ptr + sig->len();
+
+  if (ptr == limit || UTF8_GET(ptr,limit) != '(')
+    return false;
+
+  while (ptr && UTF8_PEEK (ptr, limit) != ')')
+    ptr = _Jv_VerifyOne (ptr, limit, false);
+
+  if (! ptr || UTF8_GET (ptr, limit) != ')')
+    return false;
+
+  // get the return type
+  ptr = _Jv_VerifyOne (ptr, limit, true);
+
+  return ptr == limit;
+}
+
+/* We try to avoid calling the Character methods all the time, in
+   fact, they will only be called for non-standard things. */
+static __inline__ int 
+is_identifier_start (int c)
+{
+  unsigned int ch = (unsigned)c;
+
+  if ((ch - 0x41U) < 29U) 		/* A ... Z */
+    return 1;
+  if ((ch - 0x61U) < 29U) 		/* a ... z */
+    return 1;
+  if (ch == 0x5FU)       		/* _ */
+    return 1;
+
+  return java::lang::Character::isJavaIdentifierStart ((jchar) ch);
+}
+
+static __inline__ int 
+is_identifier_part (int c)
+{
+  unsigned int ch = (unsigned)c;
+
+  if ((ch - 0x41U) < 29U) 		/* A ... Z */
+    return 1;
+  if ((ch - 0x61U) < 29U) 		/* a ... z */
+    return 1;
+  if ((ch - 0x30) < 10U)       		/* 0 .. 9 */
+    return 1;
+  if (ch == 0x5FU || ch == 0x24U)       /* _ $ */
+    return 1;
+
+  return java::lang::Character::isJavaIdentifierStart ((jchar) ch);
+}
+
+bool
+_Jv_VerifyIdentifier (_Jv_Utf8Const* name)
+{
+  unsigned char *ptr   = (unsigned char*) name->chars();
+  unsigned char *limit = (unsigned char*) name->limit();
+  int ch;
+
+  if ((ch = UTF8_GET (ptr, limit))==-1
+      || ! is_identifier_start (ch))
+    return false;
+
+  while (ptr != limit)
+    {
+      if ((ch = UTF8_GET (ptr, limit))==-1
+	  || ! is_identifier_part (ch))
+	return false;
+    }
+  return true;
+}
+
+bool
+_Jv_VerifyClassName (unsigned char* ptr, _Jv_ushort length)
+{
+  unsigned char *limit = ptr+length;
+  int ch;
+
+  if ('[' == UTF8_PEEK (ptr, limit))
+    {
+      unsigned char *end = _Jv_VerifyOne (++ptr, limit, false);
+      // _Jv_VerifyOne must leave us looking at the terminating nul
+      // byte.
+      if (! end || *end)
+	return false;
+      else
+        return true;
+    }
+
+ next_level:
+  for (;;) {
+    if ((ch = UTF8_GET (ptr, limit))==-1)
+      return false;
+    if (! is_identifier_start (ch))
+      return false;
+    for (;;) {
+      if (ptr == limit)
+	return true;
+      else if ((ch = UTF8_GET (ptr, limit))==-1)
+	return false;
+      else if (ch == '.')
+	goto next_level;
+      else if (! is_identifier_part (ch))
+	return false;
+    }
+  }
+}
+
+bool
+_Jv_VerifyClassName (_Jv_Utf8Const *name)
+{
+  return _Jv_VerifyClassName ((unsigned char*)name->chars(), name->len());
+}
+
+/* Returns true, if NAME1 and NAME2 represent classes in the same
+   package.  Neither NAME2 nor NAME2 may name an array type.  */
+bool
+_Jv_ClassNameSamePackage (_Jv_Utf8Const *name1, _Jv_Utf8Const *name2)
+{
+  unsigned char* ptr1 = (unsigned char*) name1->chars();
+  unsigned char* limit1 = (unsigned char*) name1->limit();
+
+  unsigned char* last1 = ptr1;
+
+  // scan name1, and find the last occurrence of '.'
+  while (ptr1 < limit1) {
+    int ch1 = UTF8_GET (ptr1, limit1);
+
+    if (ch1 == '.')
+      last1 = ptr1;
+
+    else if (ch1 == -1)
+      return false;
+  }
+
+  // Now the length of NAME1's package name is LEN.
+  int len = last1 - (unsigned char*) name1->chars();
+
+  // If this is longer than NAME2, then we're off.
+  if (len > name2->len())
+    return false;
+
+  // Then compare the first len bytes for equality.
+  if (memcmp ((void*) name1->chars(), (void*) name2->chars(), len) == 0)
+    {
+      // Check that there are no .'s after position LEN in NAME2.
+
+      unsigned char* ptr2 = (unsigned char*) name2->chars() + len;
+      unsigned char* limit2 = (unsigned char*) name2->limit();
+
+      while (ptr2 < limit2)
+	{
+	  int ch2 = UTF8_GET (ptr2, limit2);
+	  if (ch2 == -1 || ch2 == '.')
+	    return false;
+	}
+      return true;
+    }
+  return false;
+}

Added: llvm-gcc-4.2/trunk/libjava/exception.cc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/exception.cc?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/exception.cc (added)
+++ llvm-gcc-4.2/trunk/libjava/exception.cc Thu Nov  8 16:56:19 2007
@@ -0,0 +1,400 @@
+// Functions for Exception Support for Java.
+
+/* Copyright (C) 1998, 1999, 2001, 2002, 2006  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#include <config.h>
+
+#include <stddef.h>
+#include <stdlib.h>
+
+#include <java/lang/Class.h>
+#include <java/lang/NullPointerException.h>
+#include <gnu/gcj/RawData.h> 
+#include <gcj/cni.h>
+#include <jvm.h>
+
+// unwind-pe.h uses std::abort(), but sometimes we compile libjava
+// without libstdc++-v3. The following hack forces it to use
+// stdlib.h's abort().
+namespace std
+{
+  static __attribute__ ((__noreturn__)) void
+  abort ()
+  {
+    ::abort ();
+  }
+}
+#include "unwind.h"
+
+struct alignment_test_struct
+{
+  char space;
+  char end[0] __attribute__((aligned));
+};
+
+struct java_exception_header
+{
+  /* Cache handler details between Phase 1 and Phase 2.  */
+  _Unwind_Ptr landingPad;
+  int handlerSwitchValue;
+
+  /* The object being thrown.  Compiled code expects this to be immediately
+     before the generic exception header.  Which is complicated by the fact
+     that _Unwind_Exception is ((aligned)).  */
+
+  char pad[sizeof(jthrowable) < sizeof(alignment_test_struct)
+	   ? sizeof(alignment_test_struct) - sizeof(jthrowable) : 0]
+    __attribute__((aligned));
+
+  jthrowable value;
+
+  /* The generic exception header.  */
+  _Unwind_Exception unwindHeader;
+};
+
+// This is the exception class we report -- "GNUCJAVA".
+const _Unwind_Exception_Class __gcj_exception_class
+= ((((((((_Unwind_Exception_Class) 'G' 
+         << 8 | (_Unwind_Exception_Class) 'N')
+        << 8 | (_Unwind_Exception_Class) 'U')
+       << 8 | (_Unwind_Exception_Class) 'C')
+      << 8 | (_Unwind_Exception_Class) 'J')
+     << 8 | (_Unwind_Exception_Class) 'A')
+    << 8 | (_Unwind_Exception_Class) 'V')
+   << 8 | (_Unwind_Exception_Class) 'A');
+
+
+static inline java_exception_header *
+get_exception_header_from_ue (_Unwind_Exception *exc)
+{
+  return reinterpret_cast<java_exception_header *>(exc + 1) - 1;
+}
+
+/* Perform a throw, Java style. Throw will unwind through this call,
+   so there better not be any handlers or exception thrown here. */
+
+extern "C" void
+_Jv_Throw (jthrowable value)
+{
+  java_exception_header *xh
+    = static_cast<java_exception_header *>(_Jv_AllocRawObj (sizeof (*xh)));
+
+  if (value == NULL)
+    value = new java::lang::NullPointerException ();
+  xh->value = value;
+
+  xh->unwindHeader.exception_class = __gcj_exception_class;
+  xh->unwindHeader.exception_cleanup = NULL;
+
+  /* We're happy with setjmp/longjmp exceptions or region-based
+     exception handlers: entry points are provided here for both.  */
+  _Unwind_Reason_Code code;
+#ifdef SJLJ_EXCEPTIONS
+  code = _Unwind_SjLj_RaiseException (&xh->unwindHeader);
+#else
+  code = _Unwind_RaiseException (&xh->unwindHeader);
+#endif
+
+  /* If code == _URC_END_OF_STACK, then we reached top of stack without
+     finding a handler for the exception.  Since each thread is run in
+     a try/catch, this oughtn't happen.  If code is something else, we
+     encountered some sort of heinous lossage from which we could not
+     recover.  As is the way of such things, almost certainly we will have
+     crashed before now, rather than actually being able to diagnose the
+     problem.  */
+  abort();
+}
+
+
+#include "unwind-pe.h"
+
+struct lsda_header_info
+{
+  _Unwind_Ptr Start;
+  _Unwind_Ptr LPStart;
+  const unsigned char *TType;
+  const unsigned char *action_table;
+  unsigned char ttype_encoding;
+  unsigned char call_site_encoding;
+};
+
+static const unsigned char *
+parse_lsda_header (_Unwind_Context *context, const unsigned char *p,
+		   lsda_header_info *info)
+{
+  _Unwind_Word tmp;
+  unsigned char lpstart_encoding;
+
+  info->Start = (context ? _Unwind_GetRegionStart (context) : 0);
+
+  // Find @LPStart, the base to which landing pad offsets are relative.
+  lpstart_encoding = *p++;
+  if (lpstart_encoding != DW_EH_PE_omit)
+    p = read_encoded_value (context, lpstart_encoding, p, &info->LPStart);
+  else
+    info->LPStart = info->Start;
+
+  // Find @TType, the base of the handler and exception spec type data.
+  info->ttype_encoding = *p++;
+  if (info->ttype_encoding != DW_EH_PE_omit)
+    {
+      p = read_uleb128 (p, &tmp);
+      info->TType = p + tmp;
+    }
+  else
+    info->TType = 0;
+
+  // The encoding and length of the call-site table; the action table
+  // immediately follows.
+  info->call_site_encoding = *p++;
+  p = read_uleb128 (p, &tmp);
+  info->action_table = p + tmp;
+
+  return p;
+}
+
+static void **
+get_ttype_entry (_Unwind_Context *context, lsda_header_info *info, long i)
+{
+  _Unwind_Ptr ptr;
+
+  i *= size_of_encoded_value (info->ttype_encoding);
+  read_encoded_value (context, info->ttype_encoding, info->TType - i, &ptr);
+
+  return reinterpret_cast<void **>(ptr);
+}
+
+
+// Using a different personality function name causes link failures
+// when trying to mix code using different exception handling models.
+#ifdef SJLJ_EXCEPTIONS
+#define PERSONALITY_FUNCTION	__gcj_personality_sj0
+#define __builtin_eh_return_data_regno(x) x
+#else
+#define PERSONALITY_FUNCTION	__gcj_personality_v0
+#endif
+
+extern "C" _Unwind_Reason_Code
+PERSONALITY_FUNCTION (int version,
+		      _Unwind_Action actions,
+		      _Unwind_Exception_Class exception_class,
+		      struct _Unwind_Exception *ue_header,
+		      struct _Unwind_Context *context)
+{
+  java_exception_header *xh = get_exception_header_from_ue (ue_header);
+
+  lsda_header_info info;
+  const unsigned char *language_specific_data;
+  const unsigned char *action_record;
+  const unsigned char *p;
+  _Unwind_Ptr landing_pad, ip;
+  int handler_switch_value;
+  bool saw_cleanup;
+  bool saw_handler;
+  int ip_before_insn = 0;
+
+
+  // Interface version check.
+  if (version != 1)
+    return _URC_FATAL_PHASE1_ERROR;
+
+  // Shortcut for phase 2 found handler for domestic exception.
+  if (actions == (_UA_CLEANUP_PHASE | _UA_HANDLER_FRAME)
+      && exception_class == __gcj_exception_class)
+    {
+      handler_switch_value = xh->handlerSwitchValue;
+      landing_pad = xh->landingPad;
+      goto install_context;
+    }
+
+  // FIXME: In Phase 1, record _Unwind_GetIPInfo in xh->obj as a part of
+  // the stack trace for this exception.  This will only collect Java
+  // frames, but perhaps that is acceptable.
+  // FIXME2: _Unwind_GetIPInfo is nonsensical for SJLJ, being a call-site
+  // index instead of a PC value.  We could perhaps arrange for
+  // _Unwind_GetRegionStart to return context->fc->jbuf[1], which
+  // is the address of the handler label for __builtin_longjmp, but
+  // there is no solution for DONT_USE_BUILTIN_SETJMP.
+
+  language_specific_data = (const unsigned char *)
+    _Unwind_GetLanguageSpecificData (context);
+
+  // If no LSDA, then there are no handlers or cleanups.
+  if (! language_specific_data)
+    return _URC_CONTINUE_UNWIND;
+
+  // Parse the LSDA header.
+  p = parse_lsda_header (context, language_specific_data, &info);
+#ifdef HAVE_GETIPINFO
+  ip = _Unwind_GetIPInfo (context, &ip_before_insn);
+  if (! ip_before_insn)
+    --ip;
+#else
+  ip = _Unwind_GetIP (context) - 1;
+#endif
+  landing_pad = 0;
+  action_record = 0;
+  handler_switch_value = 0;
+
+#ifdef SJLJ_EXCEPTIONS
+  // The given "IP" is an index into the call-site table, with two
+  // exceptions -- -1 means no-action, and 0 means terminate.  But
+  // since we're using uleb128 values, we've not got random access
+  // to the array.
+  if ((int) ip <= 0)
+    return _URC_CONTINUE_UNWIND;
+  else
+    {
+      _Unwind_Word cs_lp, cs_action;
+      do
+	{
+	  p = read_uleb128 (p, &cs_lp);
+	  p = read_uleb128 (p, &cs_action);
+	}
+      while (--ip);
+
+      // Can never have null landing pad for sjlj -- that would have
+      // been indicated by a -1 call site index.
+      landing_pad = cs_lp + 1;
+      if (cs_action)
+	action_record = info.action_table + cs_action - 1;
+      goto found_something;
+    }
+#else
+  // Search the call-site table for the action associated with this IP.
+  while (p < info.action_table)
+    {
+      _Unwind_Ptr cs_start, cs_len, cs_lp;
+      _Unwind_Word cs_action;
+
+      // Note that all call-site encodings are "absolute" displacements.
+      p = read_encoded_value (0, info.call_site_encoding, p, &cs_start);
+      p = read_encoded_value (0, info.call_site_encoding, p, &cs_len);
+      p = read_encoded_value (0, info.call_site_encoding, p, &cs_lp);
+      p = read_uleb128 (p, &cs_action);
+
+      // The table is sorted, so if we've passed the ip, stop.
+      if (ip < info.Start + cs_start)
+	p = info.action_table;
+      else if (ip < info.Start + cs_start + cs_len)
+	{
+	  if (cs_lp)
+	    landing_pad = info.LPStart + cs_lp;
+	  if (cs_action)
+	    action_record = info.action_table + cs_action - 1;
+	  goto found_something;
+	}
+    }
+#endif // SJLJ_EXCEPTIONS
+
+  // If ip is not present in the table, C++ would call terminate.
+  // ??? It is perhaps better to tweek the LSDA so that no-action
+  // is mapped to no-entry for Java.
+  return _URC_CONTINUE_UNWIND;
+
+ found_something:
+  saw_cleanup = false;
+  saw_handler = false;
+
+  if (landing_pad == 0)
+    {
+      // If ip is present, and has a null landing pad, there are
+      // no cleanups or handlers to be run.
+    }
+  else if (action_record == 0)
+    {
+      // If ip is present, has a non-null landing pad, and a null
+      // action table offset, then there are only cleanups present.
+      // Cleanups use a zero switch value, as set above.
+      saw_cleanup = true;
+    }
+  else
+    {
+      // Otherwise we have a catch handler.
+      _Unwind_Sword ar_filter, ar_disp;
+
+      while (1)
+	{
+	  p = action_record;
+	  p = read_sleb128 (p, &ar_filter);
+	  read_sleb128 (p, &ar_disp);
+
+	  if (ar_filter == 0)
+	    {
+	      // Zero filter values are cleanups.
+	      saw_cleanup = true;
+	    }
+
+	  // During forced unwinding, we only run cleanups.  With a
+	  // foreign exception class, we have no class info to match.
+	  else if ((actions & _UA_FORCE_UNWIND)
+	      || exception_class != __gcj_exception_class)
+	    ;
+
+	  else if (ar_filter > 0)
+	    {
+	      // Positive filter values are handlers.
+
+	      void **catch_word = get_ttype_entry (context, &info, ar_filter);
+	      jclass catch_type = (jclass)*catch_word;
+
+	      // FIXME: This line is a kludge to work around exception
+	      // handlers written in C++, which don't yet use indirect
+	      // dispatch.
+	      if (catch_type == *(void **)&java::lang::Class::class$)
+		catch_type = (jclass)catch_word;
+
+	      if (_Jv_IsInstanceOf (xh->value, catch_type))
+		{
+		  handler_switch_value = ar_filter;
+		  saw_handler = true;
+		  break;
+		}
+	    }
+	  else
+	    {
+	      // Negative filter values are exception specifications,
+	      // which Java does not use.
+	      // ??? Perhaps better to make them an index into a table
+	      // of null-terminated strings instead of playing games
+	      // with Utf8Const+1 as above.
+	      abort ();
+	    }
+
+	  if (ar_disp == 0)
+	    break;
+	  action_record = p + ar_disp;
+	}
+    }
+
+  if (! saw_handler && ! saw_cleanup)
+    return _URC_CONTINUE_UNWIND;
+
+  if (actions & _UA_SEARCH_PHASE)
+    {
+      if (! saw_handler)
+	return _URC_CONTINUE_UNWIND;
+
+      // For domestic exceptions, we cache data from phase 1 for phase 2.
+      if (exception_class == __gcj_exception_class)
+        {
+          xh->handlerSwitchValue = handler_switch_value;
+          xh->landingPad = landing_pad;
+	}
+      return _URC_HANDLER_FOUND;
+    }
+
+ install_context:
+  _Unwind_SetGR (context, __builtin_eh_return_data_regno (0),
+		 (_Unwind_Ptr) &xh->unwindHeader);
+  _Unwind_SetGR (context, __builtin_eh_return_data_regno (1),
+		 handler_switch_value);
+  _Unwind_SetIP (context, landing_pad);
+  return _URC_INSTALL_CONTEXT;
+}

Added: llvm-gcc-4.2/trunk/libjava/gcj/Makefile.am
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gcj/Makefile.am?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gcj/Makefile.am (added)
+++ llvm-gcc-4.2/trunk/libjava/gcj/Makefile.am Thu Nov  8 16:56:19 2007
@@ -0,0 +1,16 @@
+## Process this file with automake to produce Makefile.in.
+
+AUTOMAKE_OPTIONS = foreign
+
+# May be used by various substitution variables.
+gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+
+# autoconf2.13's target_alias
+target_noncanonical = @target_noncanonical@
+
+gcjdir = $(gxx_include_dir)/gcj
+gcj_HEADERS = array.h cni.h field.h javaprims.h method.h
+
+tool_include_dir := $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include
+toolgcjdir       := $(tool_include_dir)/gcj
+toolgcj_HEADERS = libgcj-config.h

Added: llvm-gcc-4.2/trunk/libjava/gcj/Makefile.in
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gcj/Makefile.in?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gcj/Makefile.in (added)
+++ llvm-gcc-4.2/trunk/libjava/gcj/Makefile.in Thu Nov  8 16:56:19 2007
@@ -0,0 +1,579 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = gcj
+DIST_COMMON = $(gcj_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/libgcj-config.h.in \
+	$(toolgcj_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
+	$(top_srcdir)/../config/depstand.m4 \
+	$(top_srcdir)/../config/enable.m4 \
+	$(top_srcdir)/../config/gxx-include-dir.m4 \
+	$(top_srcdir)/../config/iconv.m4 \
+	$(top_srcdir)/../config/lcmessage.m4 \
+	$(top_srcdir)/../config/lead-dot.m4 \
+	$(top_srcdir)/../config/lib-ld.m4 \
+	$(top_srcdir)/../config/lib-link.m4 \
+	$(top_srcdir)/../config/lib-prefix.m4 \
+	$(top_srcdir)/../config/multi.m4 \
+	$(top_srcdir)/../config/no-executables.m4 \
+	$(top_srcdir)/../config/tls.m4 \
+	$(top_srcdir)/../config/unwind_ipinfo.m4 \
+	$(top_srcdir)/../libtool.m4 $(top_srcdir)/mingwld.m4 \
+	$(top_srcdir)/pkg.m4 $(top_srcdir)/shlibpath.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+CONFIG_HEADER = $(top_builddir)/include/config.h libgcj-config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(gcjdir)" "$(DESTDIR)$(toolgcjdir)"
+gcjHEADERS_INSTALL = $(INSTALL_HEADER)
+toolgcjHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(gcj_HEADERS) $(toolgcj_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BACKTRACESPEC = @BACKTRACESPEC@
+BASH_JAR_FALSE = @BASH_JAR_FALSE@
+BASH_JAR_TRUE = @BASH_JAR_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKREFSPEC = @CHECKREFSPEC@
+CLASSPATH_SEPARATOR = @CLASSPATH_SEPARATOR@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIRLTDL = @DIRLTDL@
+DIVIDESPEC = @DIVIDESPEC@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXCEPTIONSPEC = @EXCEPTIONSPEC@
+EXEEXT = @EXEEXT@
+GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@
+GCDEPS = @GCDEPS@
+GCINCS = @GCINCS@
+GCJ = @GCJ@
+GCJDEPMODE = @GCJDEPMODE@
+GCJFLAGS = @GCJFLAGS@
+GCJH = @GCJH@
+GCJVERSION = @GCJVERSION@
+GCLIBS = @GCLIBS@
+GCSPEC = @GCSPEC@
+GCTESTSPEC = @GCTESTSPEC@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+HASH_SYNC_SPEC = @HASH_SYNC_SPEC@
+IEEESPEC = @IEEESPEC@
+INCLTDL = @INCLTDL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERPRETER = @INTERPRETER@
+JAR = @JAR@
+JAVA_HOME = @JAVA_HOME@
+JAVA_HOME_SET_FALSE = @JAVA_HOME_SET_FALSE@
+JAVA_HOME_SET_TRUE = @JAVA_HOME_SET_TRUE@
+JC1GCSPEC = @JC1GCSPEC@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LD_FINISH_STATIC_SPEC = @LD_FINISH_STATIC_SPEC@
+LD_START_STATIC_SPEC = @LD_START_STATIC_SPEC@
+LIBART_CFLAGS = @LIBART_CFLAGS@
+LIBART_LIBS = @LIBART_LIBS@
+LIBFFI = @LIBFFI@
+LIBFFIINCS = @LIBFFIINCS@
+LIBGCJDEBUG = @LIBGCJDEBUG@
+LIBGCJTESTSPEC = @LIBGCJTESTSPEC@
+LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@
+LIBGCJ_CXXFLAGS = @LIBGCJ_CXXFLAGS@
+LIBGCJ_JAVAFLAGS = @LIBGCJ_JAVAFLAGS@
+LIBGCJ_LD_SYMBOLIC = @LIBGCJ_LD_SYMBOLIC@
+LIBGCJ_SPEC = @LIBGCJ_SPEC@
+LIBICONV = @LIBICONV@
+LIBLTDL = @LIBLTDL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NATIVE_FALSE = @NATIVE_FALSE@
+NATIVE_TRUE = @NATIVE_TRUE@
+NEEDS_DATA_START_FALSE = @NEEDS_DATA_START_FALSE@
+NEEDS_DATA_START_TRUE = @NEEDS_DATA_START_TRUE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PLATFORM_INNER_NAT_HDRS = @PLATFORM_INNER_NAT_HDRS@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SYSDEP_SOURCES = @SYSDEP_SOURCES@
+SYSTEMSPEC = @SYSTEMSPEC@
+SYS_ZLIBS = @SYS_ZLIBS@
+TESTSUBDIR_FALSE = @TESTSUBDIR_FALSE@
+TESTSUBDIR_TRUE = @TESTSUBDIR_TRUE@
+THREADCXXFLAGS = @THREADCXXFLAGS@
+THREADDEPS = @THREADDEPS@
+THREADINCS = @THREADINCS@
+THREADLDFLAGS = @THREADLDFLAGS@
+THREADLIBS = @THREADLIBS@
+THREADSPEC = @THREADSPEC@
+THREADSTARTFILESPEC = @THREADSTARTFILESPEC@
+TOOLKIT = @TOOLKIT@
+UNZIP = @UNZIP@
+USE_LIBGCJ_BC_FALSE = @USE_LIBGCJ_BC_FALSE@
+USE_LIBGCJ_BC_TRUE = @USE_LIBGCJ_BC_TRUE@
+USING_BOEHMGC_FALSE = @USING_BOEHMGC_FALSE@
+USING_BOEHMGC_TRUE = @USING_BOEHMGC_TRUE@
+USING_DARWIN_CRT_FALSE = @USING_DARWIN_CRT_FALSE@
+USING_DARWIN_CRT_TRUE = @USING_DARWIN_CRT_TRUE@
+USING_GCC_FALSE = @USING_GCC_FALSE@
+USING_GCC_TRUE = @USING_GCC_TRUE@
+USING_NOGC_FALSE = @USING_NOGC_FALSE@
+USING_NOGC_TRUE = @USING_NOGC_TRUE@
+USING_NO_THREADS_FALSE = @USING_NO_THREADS_FALSE@
+USING_NO_THREADS_TRUE = @USING_NO_THREADS_TRUE@
+USING_POSIX_PLATFORM_FALSE = @USING_POSIX_PLATFORM_FALSE@
+USING_POSIX_PLATFORM_TRUE = @USING_POSIX_PLATFORM_TRUE@
+USING_POSIX_THREADS_FALSE = @USING_POSIX_THREADS_FALSE@
+USING_POSIX_THREADS_TRUE = @USING_POSIX_THREADS_TRUE@
+USING_WIN32_PLATFORM_FALSE = @USING_WIN32_PLATFORM_FALSE@
+USING_WIN32_PLATFORM_TRUE = @USING_WIN32_PLATFORM_TRUE@
+USING_WIN32_THREADS_FALSE = @USING_WIN32_THREADS_FALSE@
+USING_WIN32_THREADS_TRUE = @USING_WIN32_THREADS_TRUE@
+VERSION = @VERSION@
+XLIB_AWT_FALSE = @XLIB_AWT_FALSE@
+XLIB_AWT_TRUE = @XLIB_AWT_TRUE@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+ZINCS = @ZINCS@
+ZIP = @ZIP@
+ZLIBS = @ZLIBS@
+ZLIBSPEC = @ZLIBSPEC@
+ZLIBTESTSPEC = @ZLIBTESTSPEC@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_AS = @ac_ct_AS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_GCJ = @ac_ct_GCJ@
+ac_ct_LD = @ac_ct_LD@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__fastdepGCJ_FALSE = @am__fastdepGCJ_FALSE@
+am__fastdepGCJ_TRUE = @am__fastdepGCJ_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_libsubdir = @build_libsubdir@
+build_os = @build_os@
+build_subdir = @build_subdir@
+build_vendor = @build_vendor@
+datadir = @datadir@
+dbexecdir = @dbexecdir@
+exec_prefix = @exec_prefix@
+extra_ldflags_libjava = @extra_ldflags_libjava@
+gxx_include_dir = @gxx_include_dir@
+here = @here@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_subdir = @host_subdir@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libstdcxx_incdir = @libstdcxx_incdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+mkinstalldirs = @mkinstalldirs@
+multi_basedir = @multi_basedir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+
+# autoconf2.13's target_alias
+target_noncanonical = @target_noncanonical@
+target_os = @target_os@
+target_subdir = @target_subdir@
+target_vendor = @target_vendor@
+toolexecdir = @toolexecdir@
+toolexeclibdir = @toolexeclibdir@
+toolexecmainlibdir = @toolexecmainlibdir@
+AUTOMAKE_OPTIONS = foreign
+
+# May be used by various substitution variables.
+gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+gcjdir = $(gxx_include_dir)/gcj
+gcj_HEADERS = array.h cni.h field.h javaprims.h method.h
+tool_include_dir := $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include
+toolgcjdir := $(tool_include_dir)/gcj
+toolgcj_HEADERS = libgcj-config.h
+all: libgcj-config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  gcj/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  gcj/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+libgcj-config.h: stamp-h2
+	@if test ! -f $@; then \
+	  rm -f stamp-h2; \
+	  $(MAKE) stamp-h2; \
+	else :; fi
+
+stamp-h2: $(srcdir)/libgcj-config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h2
+	cd $(top_builddir) && $(SHELL) ./config.status gcj/libgcj-config.h
+$(srcdir)/libgcj-config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
+	cd $(top_srcdir) && $(AUTOHEADER)
+	rm -f stamp-h2
+	touch $@
+
+distclean-hdr:
+	-rm -f libgcj-config.h stamp-h2
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+install-gcjHEADERS: $(gcj_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(gcjdir)" || $(mkdir_p) "$(DESTDIR)$(gcjdir)"
+	@list='$(gcj_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(gcjHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(gcjdir)/$$f'"; \
+	  $(gcjHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(gcjdir)/$$f"; \
+	done
+
+uninstall-gcjHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(gcj_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(gcjdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(gcjdir)/$$f"; \
+	done
+install-toolgcjHEADERS: $(toolgcj_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(toolgcjdir)" || $(mkdir_p) "$(DESTDIR)$(toolgcjdir)"
+	@list='$(toolgcj_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(toolgcjHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(toolgcjdir)/$$f'"; \
+	  $(toolgcjHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(toolgcjdir)/$$f"; \
+	done
+
+uninstall-toolgcjHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(toolgcj_HEADERS)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(toolgcjdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(toolgcjdir)/$$f"; \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES) libgcj-config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) libgcj-config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES) libgcj-config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) libgcj-config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(HEADERS) libgcj-config.h
+installdirs:
+	for dir in "$(DESTDIR)$(gcjdir)" "$(DESTDIR)$(toolgcjdir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-gcjHEADERS install-toolgcjHEADERS
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-gcjHEADERS uninstall-info-am \
+	uninstall-toolgcjHEADERS
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool ctags distclean distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am \
+	install-gcjHEADERS install-info install-info-am install-man \
+	install-strip install-toolgcjHEADERS installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-gcjHEADERS uninstall-info-am \
+	uninstall-toolgcjHEADERS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: llvm-gcc-4.2/trunk/libjava/gcj/array.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gcj/array.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gcj/array.h (added)
+++ llvm-gcc-4.2/trunk/libjava/gcj/array.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,140 @@
+// array.h - Header file for CNI arrays.  -*- c++ -*-
+
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __GCJ_ARRAY_H__
+#define __GCJ_ARRAY_H__
+
+#include <java/lang/Object.h>
+
+extern "Java" {
+
+class __JArray : public java::lang::Object
+{
+protected:
+  // This is just a hack to work around a warning emitted by the C++
+  // compiler.  We initialize `length' evilly, but it doesn't know
+  // that.
+  __JArray () : length (0)
+  {
+  }
+public:
+  const jsize length;
+  friend jsize JvGetArrayLength (__JArray*);
+};
+
+template<class T>
+class JArray;
+
+template<class T>
+inline T* elements(JArray<T>& x);
+template<class T>
+inline T* elements(JArray<T>* x);
+
+template<class T>
+class JArray : public __JArray
+{
+  T data[0];
+public:
+  friend T* elements<>(JArray<T>& x);
+  friend T* elements<>(JArray<T>* x);
+  // T* getData() { return data; }
+  // T& operator[](jint i) { return data[i]; }
+};
+
+template<class T>
+inline T* elements(JArray<T>& x) { return x.data; }
+template<class T>
+inline T* elements(JArray<T>* x) { return x->data; }
+
+} // end extern "Java"
+
+/* These typesdefs match those in JNI. */
+typedef __JArray *jarray;
+typedef JArray<jobject> *jobjectArray;
+typedef JArray<jboolean> *jbooleanArray;
+typedef JArray<jbyte> *jbyteArray;
+typedef JArray<jchar> *jcharArray;
+typedef JArray<jshort> *jshortArray;
+typedef JArray<jint> *jintArray;
+typedef JArray<jlong> *jlongArray;
+typedef JArray<jfloat> *jfloatArray;
+typedef JArray<jdouble> *jdoubleArray;
+typedef JArray<jstring> *jstringArray;
+
+extern java::lang::Class _Jv_byteClass, _Jv_shortClass, _Jv_intClass,
+  _Jv_longClass, _Jv_booleanClass, _Jv_charClass, _Jv_floatClass,
+  _Jv_doubleClass, _Jv_voidClass;
+/* The definition of this macro cannot be enclosed in parentheses
+   because "JvPrimClass(x)" is used as a template argument.  */
+#define JvPrimClass(TYPE) & _Jv_##TYPE##Class
+
+extern "C" jobjectArray _Jv_NewObjectArray(jsize length, jclass, jobject init);
+extern "C" jobject _Jv_NewPrimArray (jclass eltype, jint count);
+
+extern inline jobjectArray 
+JvNewObjectArray (jsize length, jclass cls, jobject init)
+{ 
+  return _Jv_NewObjectArray (length, cls, init); 
+}
+
+extern inline jcharArray 
+JvNewCharArray (jint length)
+{
+  return (jcharArray) _Jv_NewPrimArray (JvPrimClass (char), length);
+}
+
+extern inline jbooleanArray 
+JvNewBooleanArray (jint length)
+{
+  return (jbooleanArray) _Jv_NewPrimArray (JvPrimClass (boolean), length);
+}
+
+extern inline jbyteArray 
+JvNewByteArray (jint length)
+{
+  return (jbyteArray) _Jv_NewPrimArray (JvPrimClass (byte), length);
+}
+
+extern inline jshortArray 
+JvNewShortArray (jint length)
+{
+  return (jshortArray) _Jv_NewPrimArray (JvPrimClass (short), length);
+}
+
+extern inline jintArray 
+JvNewIntArray (jint length)
+{
+  return (jintArray) _Jv_NewPrimArray (JvPrimClass (int), length);
+}
+
+extern inline jlongArray 
+JvNewLongArray (jint length)
+{
+  return (jlongArray) _Jv_NewPrimArray (JvPrimClass (long), length);
+}
+
+extern inline jfloatArray 
+JvNewFloatArray (jint length)
+{
+  return (jfloatArray) _Jv_NewPrimArray (JvPrimClass (float), length);
+}
+
+extern inline jdoubleArray 
+JvNewDoubleArray (jint length)
+{
+  return (jdoubleArray) _Jv_NewPrimArray (JvPrimClass (double), length);
+}
+
+
+extern "C" jstringArray JvConvertArgv(int argc, const char **argv);
+
+inline jsize JvGetArrayLength (jarray array) { return array->length; }
+
+#endif /* __GCJ_ARRAY_H__ */

Added: llvm-gcc-4.2/trunk/libjava/gcj/cni.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gcj/cni.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gcj/cni.h (added)
+++ llvm-gcc-4.2/trunk/libjava/gcj/cni.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,149 @@
+// gcj/cni.h -*- c++ -*-
+// This file describes the Compiled Native Interface, CNI.
+// It provides a nicer interface to many of the things in gcj/javaprims.h.
+
+/* Copyright (C) 1998, 1999, 2002  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __GCJ_CNI_H__
+#define __GCJ_CNI_H__
+
+#include <java/lang/Object.h>
+#include <java/lang/Class.h>
+
+#include <gcj/array.h>
+#include <gcj/javaprims.h>
+
+#include <string.h>
+
+extern "C" void _Jv_InitClass (jclass);
+extern "C" void *_Jv_AllocBytes (jsize size) __attribute__((__malloc__));
+
+extern inline void
+JvInitClass (jclass cls)
+{
+  return _Jv_InitClass (cls);
+}
+
+extern inline void *
+JvAllocBytes (jsize sz)
+{
+  return _Jv_AllocBytes (sz);
+}
+
+extern inline jstring
+JvAllocString (jsize sz)
+{
+  return _Jv_AllocString (sz);
+}
+
+extern inline jstring
+JvNewString (const jchar *chars, jsize len)
+{
+  return _Jv_NewString (chars, len);
+}
+
+extern inline jstring
+JvNewStringLatin1 (const char *bytes, jsize len)
+{
+  return _Jv_NewStringLatin1 (bytes, len);
+}
+
+extern inline jstring
+JvNewStringLatin1 (const char *bytes)
+{
+  return _Jv_NewStringLatin1 (bytes, strlen (bytes));
+}
+
+extern inline jchar *
+_Jv_GetStringChars (jstring str)
+{
+  return (jchar*)((char*) str->data + str->boffset);
+}
+
+extern inline jchar*
+JvGetStringChars (jstring str)
+{
+  return _Jv_GetStringChars (str);
+}
+
+extern inline jsize
+JvGetStringUTFLength (jstring string)
+{
+  return _Jv_GetStringUTFLength (string);
+}
+
+extern inline jsize
+JvGetStringUTFRegion (jstring str, jsize start, jsize len, char *buf) 
+{ 
+  return _Jv_GetStringUTFRegion (str, start, len, buf); 
+} 
+
+extern inline jstring
+JvNewStringUTF (const char *bytes)
+{
+  return _Jv_NewStringUTF (bytes);
+}
+
+class JvSynchronize
+{
+private:
+  jobject obj;
+public:
+  JvSynchronize (const jobject &o) : obj (o)
+    { _Jv_MonitorEnter (obj); }
+  ~JvSynchronize ()
+    { _Jv_MonitorExit (obj); }
+};
+
+/* Call malloc, but throw exception if insufficient memory. */
+extern inline void *
+JvMalloc (jsize size)
+{
+  return _Jv_Malloc (size);
+}
+
+extern inline void *
+JvRealloc (void *ptr, jsize size)
+{
+  return _Jv_Realloc (ptr, size);
+}
+
+extern inline void
+JvFree (void *ptr)
+{
+  return _Jv_Free (ptr);
+}
+
+typedef struct _Jv_VMOption JvVMOption;
+typedef struct _Jv_VMInitArgs JvVMInitArgs;
+
+extern inline jint
+JvCreateJavaVM (JvVMInitArgs* vm_args)
+{
+  return _Jv_CreateJavaVM (vm_args);
+}
+
+extern inline java::lang::Thread*
+JvAttachCurrentThread (jstring name, java::lang::ThreadGroup* group)
+{
+  return _Jv_AttachCurrentThread (name, group);
+}
+
+extern inline java::lang::Thread*
+JvAttachCurrentThreadAsDaemon (jstring name, java::lang::ThreadGroup* group)
+{
+  return _Jv_AttachCurrentThreadAsDaemon (name, group);
+}
+
+extern inline jint
+JvDetachCurrentThread (void)
+{
+  return _Jv_DetachCurrentThread ();
+}
+#endif /* __GCJ_CNI_H__ */

Added: llvm-gcc-4.2/trunk/libjava/gcj/field.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gcj/field.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gcj/field.h (added)
+++ llvm-gcc-4.2/trunk/libjava/gcj/field.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,193 @@
+// field.h - Header file for fieldID instances.  -*- c++ -*-
+
+/* Copyright (C) 1998, 1999, 2000, 2004  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __GCJ_FIELD_H__
+#define __GCJ_FIELD_H__
+
+#include <java/lang/Class.h>
+#include <java/lang/reflect/Field.h>
+#include <java/lang/reflect/Modifier.h>
+#include <gnu/gcj/RawData.h>
+
+#define _Jv_FIELD_UNRESOLVED_FLAG	0x8000
+#define	_Jv_FIELD_CONSTANT_VALUE	0x4000
+
+struct _Jv_Field
+{
+  struct _Jv_Utf8Const*	name;
+
+  /* The type of the field, if isResolved().
+     If !isResolved():  The fields's signature as a (Utf8Const*). */
+  jclass		type;
+
+  _Jv_ushort		flags;
+
+  _Jv_ushort		bsize;  /* not really needed ... */
+
+  union {
+    jint		boffset;  /* offset in bytes for instance field */
+    char*		addr;  /* address of static field */
+    
+    jobject* object_addr;  /* address of static object field... etc */
+    jbyte* byte_addr;
+    jshort* short_addr;
+    jchar* char_addr;
+    jint* int_addr;
+    jlong* long_addr;
+    jfloat* float_addr;
+    jdouble* double_addr;
+  } u;
+
+#ifdef __cplusplus
+  jboolean isResolved ()
+  { return ! (flags & _Jv_FIELD_UNRESOLVED_FLAG); }
+
+  public:
+
+  int getOffset () { return u.boffset; }
+
+  jobject getObjectField (jobject obj)
+  { return *(jobject *)((char *)obj + getOffset ()); }
+
+  jfieldID getNextField () { return this + 1; }
+
+  jboolean isRef () 
+    { 
+      if (!isResolved ()) 
+	{
+	  char first = ((_Jv_Utf8Const*)type)->first(); 
+	  return first == '[' || first == 'L';
+	}
+      else
+	{
+	  return ! type->isPrimitive ();
+	}
+    }
+
+  jclass getClass ()
+  {
+    // We can't use JvAssert here because it is not in a public
+    // header.
+    // JvAssert (isResolved ());
+    return type;
+  }
+
+  // Need to mask off all unknown/internal flags before returning.
+  int getModifiers()
+  {
+    return flags & java::lang::reflect::Modifier::ALL_FLAGS;
+  }
+
+  _Jv_Utf8Const * getNameUtf8Const (jclass) { return name; }
+#endif
+};
+
+#ifdef __cplusplus
+
+inline jbyte
+_Jv_GetStaticByteField (jclass, _Jv_Field* field)
+{
+  return * (jbyte *) field->u.addr;
+}
+
+inline jshort
+_Jv_GetStaticShortField (jclass, _Jv_Field* field)
+{
+  return * (jshort *) field->u.addr;
+}
+
+inline jint
+_Jv_GetStaticIntField (jclass, _Jv_Field* field)
+{
+  return * (jint *) field->u.addr;
+}
+
+inline jlong
+_Jv_GetStaticLongField (jclass, _Jv_Field* field)
+{
+  return * (jlong *) field->u.addr;
+}
+
+inline jobject
+_Jv_GetObjectField (jobject obj, _Jv_Field* field)
+{
+  return field->getObjectField (obj);
+}
+
+inline jbyte
+_Jv_GetByteField (jobject obj, _Jv_Field* field)
+{
+  return * (jbyte *) ((char*) obj + field->getOffset ());
+}
+
+inline jshort
+_Jv_GetShortField (jobject obj, _Jv_Field* field)
+{
+  return * (jshort *) ((char*) obj + field->getOffset ());
+}
+inline jint
+_Jv_GetIntField (jobject obj, _Jv_Field* field)
+{
+  return * (jint *) ((char*) obj + field->getOffset ());
+}
+inline jlong
+_Jv_GetLongField (jobject obj, _Jv_Field* field)
+{
+  return * (jlong *) ((char*) obj + field->getOffset ());
+}
+
+extern inline jfieldID 
+_Jv_FromReflectedField (java::lang::reflect::Field *field)
+{ 
+  return (jfieldID) ((char *) field->declaringClass->fields + field->offset); 
+} 
+
+
+#ifdef __GCJ_CNI_H__
+extern inline jfieldID
+JvGetFirstInstanceField (jclass klass)
+{
+  return &(klass->fields[klass->static_field_count]);
+}
+
+extern inline jint
+JvNumInstanceFields (jclass klass)
+{
+  return klass->field_count - klass->static_field_count;
+}
+
+extern inline jfieldID
+JvGetFirstStaticField (jclass klass)
+{
+  return &(klass->fields[0]);
+}
+
+extern inline jint
+JvNumStaticFields (jclass klass)
+{
+  return klass->static_field_count;
+}
+
+extern inline jboolean
+JvFieldIsRef (jfieldID field)
+{
+  return field->isRef () && field->type != &gnu::gcj::RawData::class$;
+}
+
+extern inline jobject
+JvGetObjectField (jobject obj, _Jv_Field* field)
+{
+  return _Jv_GetObjectField (obj, field);
+}
+#endif /* defined (__GCJ_CNI_H__) */
+
+#endif /* __cplusplus */
+
+#endif /* __GCJ_FIELD_H */

Added: llvm-gcc-4.2/trunk/libjava/gcj/javaprims.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gcj/javaprims.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gcj/javaprims.h (added)
+++ llvm-gcc-4.2/trunk/libjava/gcj/javaprims.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,671 @@
+// javaprims.h - Main external header file for libgcj.  -*- c++ -*-
+
+
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __JAVAPRIMS_H__
+#define __JAVAPRIMS_H__
+
+// Force C++ compiler to use Java-style exceptions.
+#pragma GCC java_exceptions
+
+#include <gcj/libgcj-config.h>
+
+// FIXME: this is a hack until we get a proper gcjh.
+// It is needed to work around system header files that define TRUE
+// and FALSE.
+#undef TRUE
+#define TRUE TRUE
+#undef FALSE
+#define FALSE FALSE
+
+// To force selection of correct types that will mangle consistently
+// across platforms.
+extern "Java"
+{
+  typedef __java_byte jbyte;
+  typedef __java_short jshort;
+  typedef __java_int jint;
+  typedef __java_long jlong;
+  typedef __java_float jfloat;
+  typedef __java_double jdouble;
+  typedef __java_char jchar;
+  typedef __java_boolean jboolean;
+  typedef jint jsize;
+
+  // The following class declarations are automatically generated by
+  // the `classes.pl' script.
+  namespace java
+  {
+    namespace io
+    {
+      class BufferedInputStream;
+      class BufferedOutputStream;
+      class BufferedReader;
+      class BufferedWriter;
+      class ByteArrayInputStream;
+      class ByteArrayOutputStream;
+      class CharArrayReader;
+      class CharArrayWriter;
+      class CharConversionException;
+      class Closeable;
+      class DataInput;
+      class DataInputStream;
+      class DataOutput;
+      class DataOutputStream;
+      class DeleteFileHelper;
+      class DeleteFileHelper$1;
+      class EOFException;
+      class Externalizable;
+      class File;
+      class FileDescriptor;
+      class FileFilter;
+      class FileInputStream;
+      class FileNotFoundException;
+      class FileOutputStream;
+      class FilePermission;
+      class FileReader;
+      class FileWriter;
+      class FilenameFilter;
+      class FilterInputStream;
+      class FilterOutputStream;
+      class FilterReader;
+      class FilterWriter;
+      class Flushable;
+      class IOException;
+      class InputStream;
+      class InputStreamReader;
+      class InterruptedIOException;
+      class InvalidClassException;
+      class InvalidObjectException;
+      class LineNumberInputStream;
+      class LineNumberReader;
+      class NotActiveException;
+      class NotSerializableException;
+      class ObjectInput;
+      class ObjectInputStream;
+      class ObjectInputStream$1;
+      class ObjectInputStream$2;
+      class ObjectInputStream$GetField;
+      class ObjectInputStream$ValidatorAndPriority;
+      class ObjectInputValidation;
+      class ObjectOutput;
+      class ObjectOutputStream;
+      class ObjectOutputStream$1;
+      class ObjectOutputStream$PutField;
+      class ObjectStreamClass;
+      class ObjectStreamClass$1;
+      class ObjectStreamClass$2;
+      class ObjectStreamClass$InterfaceComparator;
+      class ObjectStreamClass$MemberComparator;
+      class ObjectStreamConstants;
+      class ObjectStreamException;
+      class ObjectStreamField;
+      class ObjectStreamField$1;
+      class OptionalDataException;
+      class OutputStream;
+      class OutputStreamWriter;
+      class PipedInputStream;
+      class PipedOutputStream;
+      class PipedReader;
+      class PipedWriter;
+      class PrintStream;
+      class PrintWriter;
+      class PushbackInputStream;
+      class PushbackReader;
+      class RandomAccessFile;
+      class Reader;
+      class SequenceInputStream;
+      class Serializable;
+      class SerializablePermission;
+      class StreamCorruptedException;
+      class StreamTokenizer;
+      class StringBufferInputStream;
+      class StringReader;
+      class StringWriter;
+      class SyncFailedException;
+      class UTFDataFormatException;
+      class UnsupportedEncodingException;
+      class VMObjectStreamClass;
+      class WriteAbortedException;
+      class Writer;
+    }
+
+    namespace lang
+    {
+      class AbstractMethodError;
+      class Appendable;
+      class ArithmeticException;
+      class ArrayIndexOutOfBoundsException;
+      class ArrayStoreException;
+      class AssertionError;
+      class Boolean;
+      class Byte;
+      class CharSequence;
+      class Character;
+      class Character$Subset;
+      class Character$UnicodeBlock;
+      class Class;
+      class ClassCastException;
+      class ClassCircularityError;
+      class ClassFormatError;
+      class ClassLoader;
+      class ClassNotFoundException;
+      class CloneNotSupportedException;
+      class Cloneable;
+      class Comparable;
+      class Compiler;
+      class ConcreteProcess;
+      class ConcreteProcess$EOFInputStream;
+      class ConcreteProcess$ProcessManager;
+      class Double;
+      class Enum;
+      class EnumConstantNotPresentException;
+      class Error;
+      class Exception;
+      class ExceptionInInitializerError;
+      class Float;
+      class IllegalAccessError;
+      class IllegalAccessException;
+      class IllegalArgumentException;
+      class IllegalMonitorStateException;
+      class IllegalStateException;
+      class IllegalThreadStateException;
+      class IncompatibleClassChangeError;
+      class IndexOutOfBoundsException;
+      class InheritableThreadLocal;
+      class InstantiationError;
+      class InstantiationException;
+      class Integer;
+      class InternalError;
+      class InterruptedException;
+      class Iterable;
+      class LinkageError;
+      class Long;
+      class Math;
+      class NegativeArraySizeException;
+      class NoClassDefFoundError;
+      class NoSuchFieldError;
+      class NoSuchFieldException;
+      class NoSuchMethodError;
+      class NoSuchMethodException;
+      class NullPointerException;
+      class Number;
+      class NumberFormatException;
+      class Object;
+      class OutOfMemoryError;
+      class Package;
+      class Process;
+      class Readable;
+      class Runnable;
+      class Runtime;
+      class RuntimeException;
+      class RuntimePermission;
+      class SecurityContext;
+      class SecurityException;
+      class SecurityManager;
+      class Short;
+      class StackOverflowError;
+      class StackTraceElement;
+      class StrictMath;
+      class String;
+      class String$CaseInsensitiveComparator;
+      class StringBuffer;
+      class StringBuilder;
+      class StringIndexOutOfBoundsException;
+      class System;
+      class Thread;
+      class Thread$UncaughtExceptionHandler;
+      class ThreadDeath;
+      class ThreadGroup;
+      class ThreadLocal;
+      class Throwable;
+      class Throwable$StaticData;
+      class TypeNotPresentException;
+      class UnknownError;
+      class UnsatisfiedLinkError;
+      class UnsupportedClassVersionError;
+      class UnsupportedOperationException;
+      class VMClassLoader;
+      class VMCompiler;
+      class VMDouble;
+      class VMFloat;
+      class VMSecurityManager;
+      class VMThrowable;
+      class VerifyError;
+      class VirtualMachineError;
+      class Void;
+      namespace annotation
+      {
+        class Annotation;
+        class AnnotationFormatError;
+        class AnnotationTypeMismatchException;
+      }
+
+      namespace instrument
+      {
+        class ClassDefinition;
+        class ClassFileTransformer;
+        class IllegalClassFormatException;
+        class Instrumentation;
+        class UnmodifiableClassException;
+      }
+
+      namespace ref
+      {
+        class PhantomReference;
+        class Reference;
+        class ReferenceQueue;
+        class SoftReference;
+        class WeakReference;
+      }
+
+      namespace reflect
+      {
+        class AccessibleObject;
+        class AnnotatedElement;
+        class Array;
+        class Constructor;
+        class Field;
+        class GenericArrayType;
+        class GenericDeclaration;
+        class GenericSignatureFormatError;
+        class InvocationHandler;
+        class InvocationTargetException;
+        class MalformedParameterizedTypeException;
+        class Member;
+        class Method;
+        class Modifier;
+        class ParameterizedType;
+        class Proxy;
+        class Proxy$ClassFactory;
+        class Proxy$ProxyData;
+        class Proxy$ProxySignature;
+        class Proxy$ProxyType;
+        class ReflectPermission;
+        class Type;
+        class TypeVariable;
+        class UndeclaredThrowableException;
+        class VMProxy;
+        class WildcardType;
+      }
+    }
+
+    namespace util
+    {
+      class AbstractCollection;
+      class AbstractList;
+      class AbstractList$1;
+      class AbstractList$2;
+      class AbstractList$RandomAccessSubList;
+      class AbstractList$SubList;
+      class AbstractList$SubList$3;
+      class AbstractMap;
+      class AbstractMap$1;
+      class AbstractMap$1$2;
+      class AbstractMap$3;
+      class AbstractMap$3$4;
+      class AbstractMap$BasicMapEntry;
+      class AbstractSequentialList;
+      class AbstractSet;
+      class ArrayList;
+      class Arrays;
+      class Arrays$ArrayList;
+      class BitSet;
+      class Calendar;
+      class Collection;
+      class Collections;
+      class Collections$1;
+      class Collections$CopiesList;
+      class Collections$EmptyList;
+      class Collections$EmptyMap;
+      class Collections$EmptySet;
+      class Collections$ReverseComparator;
+      class Collections$SingletonList;
+      class Collections$SingletonMap;
+      class Collections$SingletonMap$3;
+      class Collections$SingletonSet;
+      class Collections$SingletonSet$2;
+      class Collections$SynchronizedCollection;
+      class Collections$SynchronizedIterator;
+      class Collections$SynchronizedList;
+      class Collections$SynchronizedListIterator;
+      class Collections$SynchronizedMap;
+      class Collections$SynchronizedMap$4$SynchronizedMapEntry;
+      class Collections$SynchronizedMap$5;
+      class Collections$SynchronizedMap$5$6;
+      class Collections$SynchronizedRandomAccessList;
+      class Collections$SynchronizedSet;
+      class Collections$SynchronizedSortedMap;
+      class Collections$SynchronizedSortedSet;
+      class Collections$UnmodifiableCollection;
+      class Collections$UnmodifiableIterator;
+      class Collections$UnmodifiableList;
+      class Collections$UnmodifiableListIterator;
+      class Collections$UnmodifiableMap;
+      class Collections$UnmodifiableMap$UnmodifiableEntrySet;
+      class Collections$UnmodifiableMap$UnmodifiableEntrySet$7;
+      class Collections$UnmodifiableMap$UnmodifiableEntrySet$7$8;
+      class Collections$UnmodifiableRandomAccessList;
+      class Collections$UnmodifiableSet;
+      class Collections$UnmodifiableSortedMap;
+      class Collections$UnmodifiableSortedSet;
+      class Comparator;
+      class ConcurrentModificationException;
+      class Currency;
+      class Date;
+      class Dictionary;
+      class EmptyStackException;
+      class Enumeration;
+      class EventListener;
+      class EventListenerProxy;
+      class EventObject;
+      class GregorianCalendar;
+      class HashMap;
+      class HashMap$1;
+      class HashMap$2;
+      class HashMap$3;
+      class HashMap$HashEntry;
+      class HashMap$HashIterator;
+      class HashSet;
+      class Hashtable;
+      class Hashtable$1;
+      class Hashtable$2;
+      class Hashtable$3;
+      class Hashtable$EntryEnumerator;
+      class Hashtable$EntryIterator;
+      class Hashtable$HashEntry;
+      class Hashtable$KeyEnumerator;
+      class Hashtable$KeyIterator;
+      class Hashtable$ValueEnumerator;
+      class Hashtable$ValueIterator;
+      class IdentityHashMap;
+      class IdentityHashMap$1;
+      class IdentityHashMap$2;
+      class IdentityHashMap$3;
+      class IdentityHashMap$IdentityEntry;
+      class IdentityHashMap$IdentityIterator;
+      class InvalidPropertiesFormatException;
+      class Iterator;
+      class LinkedHashMap;
+      class LinkedHashMap$1;
+      class LinkedHashMap$LinkedHashEntry;
+      class LinkedHashSet;
+      class LinkedList;
+      class LinkedList$Entry;
+      class LinkedList$LinkedListItr;
+      class List;
+      class ListIterator;
+      class ListResourceBundle;
+      class Locale;
+      class Map;
+      class Map$Entry;
+      class MissingResourceException;
+      class NoSuchElementException;
+      class Observable;
+      class Observer;
+      class Properties;
+      class PropertyPermission;
+      class PropertyPermissionCollection;
+      class PropertyResourceBundle;
+      class Random;
+      class RandomAccess;
+      class ResourceBundle;
+      class ResourceBundle$BundleKey;
+      class Set;
+      class SimpleTimeZone;
+      class SortedMap;
+      class SortedSet;
+      class Stack;
+      class StringTokenizer;
+      class TimeZone;
+      class TimeZone$1;
+      class Timer;
+      class Timer$Scheduler;
+      class Timer$TaskQueue;
+      class TimerTask;
+      class TooManyListenersException;
+      class TreeMap;
+      class TreeMap$1;
+      class TreeMap$2;
+      class TreeMap$3;
+      class TreeMap$Node;
+      class TreeMap$SubMap;
+      class TreeMap$SubMap$4;
+      class TreeMap$SubMap$5;
+      class TreeMap$SubMap$6;
+      class TreeMap$TreeIterator;
+      class TreeSet;
+      class VMTimeZone;
+      class Vector;
+      class Vector$1;
+      class WeakHashMap;
+      class WeakHashMap$1;
+      class WeakHashMap$WeakBucket;
+      class WeakHashMap$WeakBucket$WeakEntry;
+      class WeakHashMap$WeakEntrySet;
+      class WeakHashMap$WeakEntrySet$2;
+      namespace jar
+      {
+        class Attributes;
+        class Attributes$Name;
+        class JarEntry;
+        class JarException;
+        class JarFile;
+        class JarFile$EntryInputStream;
+        class JarFile$JarEnumeration;
+        class JarInputStream;
+        class JarOutputStream;
+        class Manifest;
+      }
+
+      namespace logging
+      {
+        class ConsoleHandler;
+        class ErrorManager;
+        class FileHandler;
+        class FileHandler$ostr;
+        class Filter;
+        class Formatter;
+        class Handler;
+        class Level;
+        class LogManager;
+        class LogRecord;
+        class Logger;
+        class Logger$1;
+        class LoggingPermission;
+        class MemoryHandler;
+        class SimpleFormatter;
+        class SocketHandler;
+        class StreamHandler;
+        class XMLFormatter;
+      }
+
+      namespace prefs
+      {
+        class AbstractPreferences;
+        class AbstractPreferences$1;
+        class AbstractPreferences$2;
+        class BackingStoreException;
+        class InvalidPreferencesFormatException;
+        class NodeChangeEvent;
+        class NodeChangeListener;
+        class PreferenceChangeEvent;
+        class PreferenceChangeListener;
+        class Preferences;
+        class Preferences$1;
+        class PreferencesFactory;
+      }
+
+      namespace regex
+      {
+        class MatchResult;
+        class Matcher;
+        class Pattern;
+        class PatternSyntaxException;
+      }
+
+      namespace zip
+      {
+        class Adler32;
+        class CRC32;
+        class CheckedInputStream;
+        class CheckedOutputStream;
+        class Checksum;
+        class DataFormatException;
+        class Deflater;
+        class DeflaterOutputStream;
+        class GZIPInputStream;
+        class GZIPOutputStream;
+        class Inflater;
+        class InflaterInputStream;
+        class ZipConstants;
+        class ZipEntry;
+        class ZipException;
+        class ZipFile;
+        class ZipFile$1;
+        class ZipFile$PartialInputStream;
+        class ZipFile$ZipEntryEnumeration;
+        class ZipInputStream;
+        class ZipOutputStream;
+      }
+    }
+  }
+}
+  
+typedef struct java::lang::Object* jobject;
+typedef class java::lang::Class* jclass;
+typedef class java::lang::Throwable* jthrowable;
+typedef class java::lang::String* jstring;
+struct _Jv_JNIEnv;
+
+typedef struct _Jv_Field *jfieldID;
+typedef struct _Jv_Method *jmethodID;
+
+extern "C" jobject _Jv_AllocObject (jclass) __attribute__((__malloc__));
+extern "C" jobject _Jv_AllocObjectNoFinalizer (jclass) __attribute__((__malloc__));
+extern "C" jobject _Jv_AllocObjectNoInitNoFinalizer (jclass) __attribute__((__malloc__));
+#ifdef JV_HASH_SYNCHRONIZATION
+  extern "C" jobject _Jv_AllocPtrFreeObject (jclass)
+  			    __attribute__((__malloc__));
+#else
+  // Collector still needs to scan sync_info
+  static inline jobject _Jv_AllocPtrFreeObject (jclass klass)
+  {
+    return _Jv_AllocObject(klass);
+  }
+#endif
+extern "C" jboolean _Jv_IsInstanceOf(jobject, jclass);
+extern "C" jstring _Jv_AllocString(jsize) __attribute__((__malloc__));
+extern "C" jstring _Jv_NewString (const jchar*, jsize)
+  __attribute__((__malloc__));
+extern jint _Jv_FormatInt (jchar* bufend, jint num);
+extern "C" jchar* _Jv_GetStringChars (jstring str);
+extern "C" void _Jv_MonitorEnter (jobject);
+extern "C" void _Jv_MonitorExit (jobject);
+extern "C" jstring _Jv_NewStringUTF (const char *bytes)
+  __attribute__((__malloc__));
+extern "C" jstring _Jv_NewStringLatin1(const char*, jsize)
+  __attribute__((__malloc__));
+extern "C" jsize _Jv_GetStringUTFLength (jstring);
+extern "C" jsize _Jv_GetStringUTFRegion (jstring, jsize, jsize, char *);
+extern "C" jint _Jv_hashUtf8String (const char*, int);
+
+struct _Jv_VMOption
+{
+  // a VM initialization option
+  char* optionString;
+  // extra information associated with this option
+  void* extraInfo;
+};
+
+struct _Jv_VMInitArgs
+{
+  // for compatibility with JavaVMInitArgs
+  jint version;
+
+  // number of VM initialization options
+  jint nOptions;
+
+  // an array of VM initialization options
+  struct _Jv_VMOption* options;
+
+  // true if the option parser should ignore unrecognized options
+  jboolean ignoreUnrecognized;
+};
+
+extern jint _Jv_CreateJavaVM (struct _Jv_VMInitArgs*);
+
+void
+_Jv_ThreadRun (java::lang::Thread* thread);
+jint
+_Jv_AttachCurrentThread(java::lang::Thread* thread);
+extern "C" java::lang::Thread*
+_Jv_AttachCurrentThread(jstring name, java::lang::ThreadGroup* group);
+extern "C" java::lang::Thread*
+_Jv_AttachCurrentThreadAsDaemon(jstring name, java::lang::ThreadGroup* group);
+extern "C" jint _Jv_DetachCurrentThread (void);
+
+extern "C" void _Jv_Throw (jthrowable) __attribute__ ((__noreturn__));
+extern "C" void* _Jv_Malloc (jsize) __attribute__((__malloc__));
+extern "C" void* _Jv_Realloc (void *, jsize);
+extern "C" void _Jv_Free (void*);
+extern void (*_Jv_RegisterClassHook) (jclass cl);
+extern "C" void _Jv_RegisterClassHookDefault (jclass);
+
+typedef unsigned short _Jv_ushort __attribute__((__mode__(__HI__)));
+typedef unsigned int _Jv_uint __attribute__((__mode__(__SI__)));
+typedef unsigned int _Jv_ulong __attribute__((__mode__(__DI__)));
+
+// The type to use when treating a pointer as an integer.  Similar to
+// uintptr_t in C99.
+typedef unsigned int _Jv_uintptr_t __attribute__((__mode__(__pointer__)));
+
+class _Jv_Utf8Const
+{
+  _Jv_ushort hash;
+  _Jv_ushort length;	/* In bytes, of data portion, without final '\0'. */
+  char data[1];		/* In Utf8 format, with final '\0'. */
+ public:
+  /** Return same value of java.lang.String's hashCode. */
+  jint hash32() { return _Jv_hashUtf8String(data, length); }
+  /** Return a hash code that has at least 16 bits of information. */
+  _Jv_ushort hash16 () { return hash; }
+  /** Return a hash code that has at least 8 bits of information. */
+  _Jv_ushort hash8 () { return hash; }
+  /** Length in bytes of the UTF8-encoding. */
+  _Jv_ushort len () const { return length; }
+  /** Pointer to the first byte in the NUL-terminated UTF8-encoding. */
+  char* chars() { return data; }
+  /** Pointer to the NUL byte that terminated the UTF8-encoding. */
+  char* limit() { return data+length; }
+  /** Return the first byte in the UTF8-encoding. */
+  char first() const { return data[0]; }
+  /** Create a (non-interned) java.lang.String from this UTF8Const. */
+  jstring toString() { return _Jv_NewStringUTF(data); }
+  /** Given an UTF8 string, how many bytes needed for a UTF8Const,
+      including struct header, and final NUL.  I.e. what to pas to malloc. */
+  static int space_needed (const char *, int len)
+  { return sizeof (_Jv_Utf8Const) + len + 1; }
+  /** Given an allocated _Jv_Utf8Const, copy / fill it in. */
+  void init (const char *s, int len);
+  friend jboolean _Jv_equalUtf8Consts (const _Jv_Utf8Const*, const _Jv_Utf8Const *);
+  friend jboolean _Jv_equal (_Jv_Utf8Const*, jstring, jint);
+  friend jboolean _Jv_equaln (_Jv_Utf8Const*, jstring, jint);
+  friend jboolean _Jv_equalUtf8Classnames (const _Jv_Utf8Const*,
+                                             const _Jv_Utf8Const*);
+  friend jboolean _Jv_isPrimitiveOrDerived (const _Jv_Utf8Const*);
+  friend _Jv_Utf8Const *_Jv_makeUtf8Const (const char*, int);
+  friend _Jv_Utf8Const *_Jv_makeUtf8Const (jstring);
+  friend jstring _Jv_NewStringUtf8Const (_Jv_Utf8Const*);
+};
+
+
+#endif /* __JAVAPRIMS_H__ */

Added: llvm-gcc-4.2/trunk/libjava/gcj/libgcj-config.h.in
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gcj/libgcj-config.h.in?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gcj/libgcj-config.h.in (added)
+++ llvm-gcc-4.2/trunk/libjava/gcj/libgcj-config.h.in Thu Nov  8 16:56:19 2007
@@ -0,0 +1,13 @@
+/* The header file derived from this file is installed in a target and
+   compiler version specific directory.  Do not add definitions which
+   are intended to be different for different multilibs, as we do not
+   currently have a mechanism to support this.
+
+   Also be sure to use safely named macros, as this file will be 
+   included in user code.  */
+
+/* Define if hash synchronization is in use.  */
+#undef JV_HASH_SYNCHRONIZATION
+
+/* Define if <inttypes.h> is available.  */
+#undef JV_HAVE_INTTYPES_H

Added: llvm-gcc-4.2/trunk/libjava/gcj/method.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gcj/method.h?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gcj/method.h (added)
+++ llvm-gcc-4.2/trunk/libjava/gcj/method.h Thu Nov  8 16:56:19 2007
@@ -0,0 +1,44 @@
+// method.h - Header file for methodID instances.  -*- c++ -*-
+
+/* Copyright (C) 1999, 2000  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#ifndef __GCJ_METHOD_H__
+#define __GCJ_METHOD_H__
+
+#include <java/lang/Class.h>
+#include <java/lang/reflect/Constructor.h>
+#include <java/lang/reflect/Method.h>
+
+extern inline jmethodID
+_Jv_FromReflectedMethod (java::lang::reflect::Method *method)
+{
+  return (jmethodID)
+    ((char *) method->declaringClass->methods + method->offset);
+}
+
+extern inline jmethodID
+_Jv_FromReflectedConstructor (java::lang::reflect::Constructor *constructor)
+{
+  return (jmethodID)
+    ((char *) constructor->declaringClass->methods + constructor->offset);
+}
+
+extern inline jint
+JvNumMethods (jclass klass)
+{
+  return klass->method_count;
+}
+
+extern inline jmethodID
+JvGetFirstMethod (jclass klass)
+{
+  return &klass->methods[0];
+}
+
+#endif /* __GCJ_METHOD_H__ */

Added: llvm-gcc-4.2/trunk/libjava/gij.cc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gij.cc?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gij.cc (added)
+++ llvm-gcc-4.2/trunk/libjava/gij.cc Thu Nov  8 16:56:19 2007
@@ -0,0 +1,334 @@
+/* Copyright (C) 1999-2006  Free Software Foundation
+
+   This file is part of libgcj.
+
+   This software is copyrighted work licensed under the terms of the
+   Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+   details. */
+
+#include <config.h>
+
+#include <jvm.h>
+#include <gcj/cni.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+static void
+help ()
+{
+  printf ("Usage: gij [OPTION] ... CLASS [ARGS] ...\n");
+  printf ("          to interpret Java bytecodes, or\n");
+  printf ("       gij -jar [OPTION] ... JARFILE [ARGS] ...\n");
+  printf ("          to execute a jar file\n\n");
+  printf ("  --cp LIST         set class path\n");
+  printf ("  --classpath LIST  set class path\n");
+  printf ("  -DVAR=VAL         define property VAR with value VAL\n");
+  printf ("  -?, --help        print this help, then exit\n");
+  printf ("  -X                print help on supported -X options, then exit\n");
+  printf ("  --ms=NUMBER       set initial heap size\n");
+  printf ("  --mx=NUMBER       set maximum heap size\n");
+  printf ("  --verbose[:class] print information about class loading\n");
+  printf ("  --showversion     print version number, then keep going\n");
+  printf ("  --version         print version number, then exit\n");
+  printf ("\nOptions can be specified with `-' or `--'.\n");
+  printf ("\nSee http://gcc.gnu.org/java/ for information on reporting bugs\n");
+  exit (0);
+}
+
+static void
+version ()
+{
+  printf ("java version \"" JV_VERSION "\"\n");
+  printf ("gij (GNU libgcj) version %s\n\n", __VERSION__);
+  printf ("Copyright (C) 2006 Free Software Foundation, Inc.\n");
+  printf ("This is free software; see the source for copying conditions.  There is NO\n");
+  printf ("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
+}
+
+static void
+nonstandard_opts_help ()
+{
+  printf ("  -Xms<size>         set initial heap size\n");
+  printf ("  -Xmx<size>         set maximum heap size\n");
+  printf ("  -Xss<size>         set thread stack size\n");
+  exit (0);
+}
+
+static void
+add_option (JvVMInitArgs& vm_args, char const* option, void const* extra)
+{
+  vm_args.options =
+    (JvVMOption*) JvRealloc (vm_args.options,
+                             (vm_args.nOptions + 1) * sizeof (JvVMOption));
+
+  vm_args.options[vm_args.nOptions].optionString = const_cast<char*> (option);
+  vm_args.options[vm_args.nOptions].extraInfo = const_cast<void*> (extra);
+  ++vm_args.nOptions;
+}
+
+int
+main (int argc, char const** argv)
+{
+  JvVMInitArgs vm_args;
+  bool jar_mode = false;
+
+  vm_args.options = NULL;
+  vm_args.nOptions = 0;
+  vm_args.ignoreUnrecognized = true;
+
+  // Command-line options always override the CLASSPATH environment
+  // variable.
+  char *classpath = getenv("CLASSPATH");
+
+  if (classpath)
+    {
+      char* darg = (char*) JvMalloc (strlen (classpath)
+                                     + sizeof ("-Djava.class.path="));
+      sprintf (darg, "-Djava.class.path=%s", classpath);
+      add_option (vm_args, darg, NULL);
+    }
+
+  // Handle arguments to the java command.  Store in vm_args arguments
+  // handled by the invocation API.
+  int i;
+  for (i = 1; i < argc; ++i)
+    {
+      char* arg = const_cast<char*> (argv[i]);
+
+      // A non-option stops processing.
+      if (arg[0] != '-')
+	break;
+
+      // A "--" stops processing.
+      if (! strcmp (arg, "--"))
+	{
+	  ++i;
+	  break;
+	}
+
+      // Allow both single or double hyphen for all options.
+      if (arg[1] == '-')
+	++arg;
+
+      // Ignore JIT options
+      if (! strcmp (arg, "-client"))
+        continue;
+      else if (! strcmp (arg, "-server"))
+        continue;
+      else if (! strcmp (arg, "-hotspot"))
+        continue;
+      else if (! strcmp (arg, "-jrockit"))
+        continue;
+      // Ignore JVM Tool Interface options
+      else if (! strncmp (arg, "-agentlib:", sizeof ("-agentlib:") - 1))
+        continue;
+      else if (! strncmp (arg, "-agentpath:", sizeof ("-agentpath:") - 1))
+        continue;
+      else if (! strcmp (arg, "-classpath") || ! strcmp (arg, "-cp"))
+        {
+          if (i >= argc - 1)
+            {
+	    no_arg:
+	      fprintf (stderr, "gij: option requires an argument -- `%s'\n",
+		       argv[i]);
+	      fprintf (stderr, "Try `gij --help' for more information.\n");
+	      exit (1);
+            }
+
+          // Sun seems to translate the -classpath option into
+          // -Djava.class.path because if both -classpath and
+          // -Djava.class.path are specified on the java command line,
+          // the last one always wins.
+          char* darg = (char*) JvMalloc (strlen (argv[++i])
+                                         + sizeof ("-Djava.class.path="));
+          sprintf (darg, "-Djava.class.path=%s", argv[i]);
+          add_option (vm_args, darg, NULL);
+        }
+      else if (! strcmp (arg, "-debug"))
+        {
+          char* xarg = strdup ("-Xdebug");
+          add_option (vm_args, xarg, NULL);
+        }
+      else if (! strncmp (arg, "-D", sizeof ("-D") - 1))
+        add_option (vm_args, arg, NULL);
+      // Ignore 32/64-bit JIT options
+      else if (! strcmp (arg, "-d32") || ! strcmp (arg, "-d64"))
+        continue;
+      else if (! strncmp (arg, "-enableassertions", sizeof ("-enableassertions") - 1)
+               || ! strncmp (arg, "-ea", sizeof ("-ea") - 1))
+        {
+          // FIXME: hook up assertion support
+          continue;
+        }
+      else if (! strncmp (arg, "-disableassertions", sizeof ("-disableassertions") - 1)
+               || ! strncmp (arg, "-da", sizeof ("-da") - 1))
+        {
+          // FIXME: hook up assertion support
+          continue;
+        }
+      else if (! strcmp (arg, "-enablesystemassertions")
+               || ! strcmp (arg, "-esa"))
+        {
+          // FIXME: hook up system assertion support
+          continue;
+        }
+      else if (! strcmp (arg, "-disablesystemassertions")
+               || ! strcmp (arg, "-dsa"))
+        {
+          // FIXME
+          continue;
+        }
+      else if (! strcmp (arg, "-jar"))
+	{
+	  jar_mode = true;
+	  continue;
+	}
+      // Ignore java.lang.instrument option
+      else if (! strncmp (arg, "-javaagent:", sizeof ("-javaagent:") - 1))
+        continue;
+      else if (! strcmp (arg, "-noclassgc"))
+        {
+          char* xarg = strdup ("-Xnoclassgc");
+          add_option (vm_args, xarg, NULL);
+        }
+      // -ms=n
+      else if (! strncmp (arg, "-ms=", sizeof ("-ms=") - 1))
+        {
+          arg[1] = 'X';
+          arg[2] = 'm';
+          arg[3] = 's';
+          add_option (vm_args, arg, NULL);
+        }
+      // -ms n
+      else if (! strcmp (arg, "-ms"))
+	{
+	  if (i >= argc - 1)
+            goto no_arg;
+
+          char* xarg = (char*) JvMalloc (strlen (argv[++i])
+                                         + sizeof ("-Xms"));
+          sprintf (xarg, "-Xms%s", argv[i]);
+          add_option (vm_args, xarg, NULL);
+	}
+      // -msn
+      else if (! strncmp (arg, "-ms", sizeof ("-ms") - 1))
+	{
+          char* xarg = (char*) JvMalloc (strlen (arg) + sizeof ("X"));
+          sprintf (xarg, "-Xms%s", arg + sizeof ("-Xms") - 1);
+          add_option (vm_args, xarg, NULL);
+	}
+      // -mx=n
+      else if (! strncmp (arg, "-mx=", sizeof ("-mx=") - 1))
+        {
+          arg[1] = 'X';
+          arg[2] = 'm';
+          arg[3] = 'x';
+          add_option (vm_args, arg, NULL);
+        }
+      // -mx n
+      else if (! strcmp (arg, "-mx"))
+	{
+	  if (i >= argc - 1)
+            goto no_arg;
+
+          char* xarg = (char*) JvMalloc (strlen (argv[++i])
+                                         + sizeof ("-Xmx"));
+          sprintf (xarg, "-Xmx%s", argv[i]);
+          add_option (vm_args, xarg, NULL);
+	}
+      // -mxn
+      else if (! strncmp (arg, "-mx", sizeof ("-mx") - 1))
+	{
+          char* xarg = (char*) JvMalloc (strlen (arg) + sizeof ("X"));
+          sprintf (xarg, "-Xmx%s", arg + sizeof ("-Xmx") - 1);
+          add_option (vm_args, xarg, NULL);
+	}
+      // -ss=n
+      else if (! strncmp (arg, "-ss=", sizeof ("-ss=") - 1))
+        {
+          arg[1] = 'X';
+          arg[2] = 's';
+          arg[3] = 's';
+          add_option (vm_args, arg, NULL);
+        }
+      // -ss n
+      else if (! strcmp (arg, "-ss"))
+	{
+	  if (i >= argc - 1)
+            goto no_arg;
+
+          char* xarg = (char*) JvMalloc (strlen (argv[++i])
+                                         + sizeof ("-Xss"));
+          sprintf (xarg, "-Xss%s", argv[i]);
+          add_option (vm_args, xarg, NULL);
+	}
+      // -ssn
+      else if (! strncmp (arg, "-ss", sizeof ("-ss") - 1))
+	{
+          char* xarg = (char*) JvMalloc (strlen (arg) + sizeof ("X"));
+          sprintf (xarg, "-Xss%s", arg + sizeof ("-Xss") - 1);
+          add_option (vm_args, xarg, NULL);
+	}
+      // This handles all the option variants that begin with
+      // -verbose.
+      else if (! strncmp (arg, "-verbose", 8))
+        add_option (vm_args, arg, NULL);
+      else if (! strcmp (arg, "-version"))
+	{
+	  version ();
+	  exit (0);
+	}
+      else if (! strcmp (arg, "-fullversion"))
+        {
+          printf ("java full version \"gcj-" JV_VERSION "\"\n");
+          exit (0);
+        }
+      else if (! strcmp (arg, "-showversion"))
+        version ();
+      else if (! strcmp (arg, "-help") || ! strcmp (arg, "-?"))
+	help ();
+      else if (! strcmp (arg, "-X"))
+        nonstandard_opts_help ();
+      else if (! strncmp (arg, "-X", 2))
+        add_option (vm_args, arg, NULL);
+      // Obsolete options recognized for backwards-compatibility.
+      else if (! strcmp (arg, "-verify")
+               || ! strcmp (arg, "-verifyremote"))
+	continue;
+      else if (! strcmp (arg, "-noverify"))
+        {
+	  gcj::verifyClasses = false;
+	}
+      else
+	{
+	  fprintf (stderr, "gij: unrecognized option -- `%s'\n", argv[i]);
+	  fprintf (stderr, "Try `gij --help' for more information.\n");
+	  exit (1);
+	}
+    }
+
+  if (argc - i < 1)
+    {
+      fprintf (stderr, "Usage: gij [OPTION] ... CLASS [ARGS] ...\n");
+      fprintf (stderr, "          to invoke CLASS.main, or\n");
+      fprintf (stderr, "       gij -jar [OPTION] ... JARFILE [ARGS] ...\n");
+      fprintf (stderr, "          to execute a jar file\n");
+      fprintf (stderr, "Try `gij --help' for more information.\n");
+      exit (1);
+    }
+
+  // -jar mode overrides all other modes of specifying class path:
+  // CLASSPATH, -Djava.class.path, -classpath and -cp.
+  if (jar_mode)
+    {
+      char* darg = (char*) JvMalloc (strlen (argv[i])
+                                      + sizeof ("-Djava.class.path="));
+      sprintf (darg, "-Djava.class.path=%s", argv[i]);
+      add_option (vm_args, darg, NULL);
+    }
+
+  _Jv_RunMain (&vm_args, NULL, argv[i], argc - i,
+               (char const**) (argv + i), jar_mode);
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/CORBA/DynAn/RecordAny.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/CORBA/DynAn/RecordAny.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/CORBA/DynAn/RecordAny.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/CORBA/DynAn/RecordAny.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,416 @@
+/* RecordAny.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.DynAn;
+
+import gnu.CORBA.Unexpected;
+import gnu.CORBA.HolderLocator;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.TypeCodePackage.Bounds;
+import org.omg.CORBA.portable.Streamable;
+import org.omg.DynamicAny.DynAny;
+import org.omg.DynamicAny.DynAnyPackage.InvalidValue;
+import org.omg.DynamicAny.DynAnyPackage.TypeMismatch;
+import org.omg.DynamicAny.DynStruct;
+import org.omg.DynamicAny.DynValueCommonOperations;
+import org.omg.DynamicAny.NameDynAnyPair;
+import org.omg.DynamicAny.NameValuePair;
+
+import java.io.Serializable;
+
+import java.lang.reflect.Field;
+
+/**
+ * A shared base for both dynamic structure an dynamic value final_type.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA at Bioinformatics.org)
+ */
+public abstract class RecordAny
+  extends DivideableAny
+  implements DynAny, Serializable
+{
+  /**
+   * Use serialVersionUID for interoperability.
+   */
+  private static final long serialVersionUID = 1;
+  String[] fNames;
+
+  /**
+   * Creates the structure with the given typecode.
+   *
+   * @param fields The DynAny's, representing the fields of the structure.
+   */
+  public RecordAny(TypeCode oType, TypeCode aType,
+                        gnuDynAnyFactory aFactory, ORB anOrb
+                       )
+  {
+    super(oType, aType, aFactory, anOrb);
+  }
+
+  /** @inheritDoc */
+  public TCKind current_member_kind()
+                             throws TypeMismatch, InvalidValue
+  {
+    if (array.length == 0)
+      throw new TypeMismatch(EMPTY);
+    try
+      {
+        return final_type.member_type(pos).kind();
+      }
+    catch (BadKind e)
+      {
+        TypeMismatch t = new TypeMismatch();
+        t.initCause(e);
+        throw t;
+      }
+    catch (Bounds e)
+      {
+        InvalidValue t = new InvalidValue();
+        t.initCause(e);
+        throw t;
+      }
+  }
+
+  /** @inheritDoc */
+  public String current_member_name()
+                             throws TypeMismatch, InvalidValue
+  {
+    if (array.length == 0)
+      throw new TypeMismatch(EMPTY);
+    try
+      {
+        return final_type.member_name(pos);
+      }
+    catch (BadKind e)
+      {
+        TypeMismatch t = new TypeMismatch();
+        t.initCause(e);
+        throw t;
+      }
+    catch (Bounds e)
+      {
+        InvalidValue t = new InvalidValue();
+        t.initCause(e);
+        throw t;
+      }
+  }
+
+  /**
+   * Get content of the structure. This method must be defined on a different
+   * name because get_members_as_dyn_any() throws exception only in some of the
+   * supported interfaces.
+   */
+  public NameDynAnyPair[] gnu_get_members_as_dyn_any()
+  {
+    NameDynAnyPair[] r = new NameDynAnyPair[ array.length ];
+    for (int i = 0; i < r.length; i++)
+      {
+        try
+          {
+            r [ i ] = new NameDynAnyPair(fNames [ i ], array [ i ]);
+          }
+        catch (Exception ex)
+          {
+            throw new Unexpected(ex);
+          }
+      }
+    return r;
+  }
+
+  /**
+   * Get content of the structure. This method must be defined on a different
+   * name because get_members_as_dyn_any() throws exception only in some of the
+   * supported interfaces.
+   */
+  public NameValuePair[] gnu_get_members()
+  {
+    NameValuePair[] r = new NameValuePair[ array.length ];
+    for (int i = 0; i < r.length; i++)
+      {
+        try
+          {
+            r [ i ] = new NameValuePair(fNames [ i ], array [ i ].to_any());
+          }
+        catch (Exception ex)
+          {
+            throw new Unexpected(ex);
+          }
+      }
+    return r;
+  }
+
+  /**
+   * Set members from the provided array.
+   */
+  public void set_members_as_dyn_any(NameDynAnyPair[] value)
+                              throws TypeMismatch, InvalidValue
+  {
+    if (value.length != array.length)
+      throw new InvalidValue(sizeMismatch(array.length, value.length));
+
+    for (int i = 0; i < value.length; i++)
+      {
+        DynAny dynAny = value [ i ].value;
+        checkType(dynAny.type(), i);
+        checkName(value [ i ].id, i);
+
+        array [ i ] = dynAny;
+      }
+    pos = 0;
+  }
+
+  /**
+   * Check the name at the given position ("" matches everything).
+   */
+  private void checkName(String xName, int i)
+                  throws TypeMismatch
+  {
+    if (xName.length() > 0 && fNames [ i ].length() > 0)
+      if (!xName.equals(fNames [ i ]))
+        throw new TypeMismatch("Field name mismatch " + xName + " expected " +
+                               fNames [ i ]
+                              );
+  }
+
+  /**
+   * Check the type at the given position.
+   */
+  private void checkType(TypeCode t, int i)
+                  throws TypeMismatch
+  {
+    if (!array [ i ].type().equal(t))
+      throw new TypeMismatch(typeMismatch(array [ i ].type(), t) + " field " +
+                             i
+                            );
+  }
+
+  /**
+   * Set members from the provided array.
+   */
+  public void set_members(NameValuePair[] value)
+                   throws TypeMismatch, InvalidValue
+  {
+    if (value.length != array.length)
+      throw new InvalidValue(sizeMismatch(array.length, value.length));
+
+    for (int i = 0; i < value.length; i++)
+      {
+        Any any = value [ i ].value;
+        checkType(any.type(), i);
+        checkName(value [ i ].id, i);
+
+        array [ i ].from_any(any);
+      }
+    pos = 0;
+  }
+
+  /** @inheritDoc */
+  public void assign(DynAny from)
+              throws TypeMismatch
+  {
+    checkType(official_type, from.type());
+    if (from instanceof DynStruct)
+      {
+        try
+          {
+            set_members_as_dyn_any(((DynStruct) from).get_members_as_dyn_any());
+          }
+        catch (InvalidValue e)
+          {
+            TypeMismatch t = new TypeMismatch("Invalid value");
+            t.initCause(e);
+            throw t;
+          }
+      }
+    else
+      throw new TypeMismatch("Not a DynStruct");
+  }
+
+  /**
+   * Create a copy.
+   */
+  public DynAny copy()
+  {
+    DynAny[] c = new DynAny[ array.length ];
+    for (int i = 0; i < c.length; i++)
+      {
+        c [ i ] = array [ i ].copy();
+      }
+
+    RecordAny d = newInstance(official_type, final_type, factory, orb);
+    d.array = c;
+    return d;
+  }
+
+  /**
+   * Create a new instance when copying.
+   */
+  protected abstract RecordAny newInstance(TypeCode oType, TypeCode aType,
+                                                gnuDynAnyFactory aFactory,
+                                                ORB anOrb
+                                               );
+
+  /**
+   * Done via reflection.
+   */
+  public Any to_any()
+  {
+    try
+      {
+        Streamable sHolder = HolderLocator.createHolder(official_type);
+
+        Class sHolderClass = sHolder.getClass();
+        Field sHolderValue = sHolderClass.getField("value");
+        Class sClass = sHolderValue.getType();
+
+        Object structure = sClass.newInstance();
+        Object member;
+        Any am;
+        Field vread;
+        Field vwrite;
+        Streamable memberHolder;
+
+        for (int i = 0; i < array.length; i++)
+          {
+            am = array [ i ].to_any();
+            memberHolder = am.extract_Streamable();
+            vwrite = structure.getClass().getField(final_type.member_name(i));
+            vread = memberHolder.getClass().getField("value");
+            member = vread.get(memberHolder);
+            vwrite.set(structure, member);
+          }
+
+        Any g = createAny();
+        sHolderValue.set(sHolder, structure);
+        g.insert_Streamable(sHolder);
+        g.type(official_type);
+        return g;
+      }
+    catch (Exception e)
+      {
+        throw new Unexpected(e);
+      }
+  }
+
+  /**
+   * Done via reflection.
+   */
+  public void from_any(Any an_any)
+                throws TypeMismatch, InvalidValue
+  {
+    checkType(official_type, an_any.type());
+    try
+      {
+        Streamable s = an_any.extract_Streamable();
+        if (s == null)
+          {
+            if (this instanceof DynValueCommonOperations)
+              {
+                ((DynValueCommonOperations) this).set_to_null();
+                return;
+              }
+            else
+              throw new InvalidValue(ISNULL);
+          }
+
+        Object structure = s.getClass().getField("value").get(s);
+        if (structure == null && (this instanceof DynValueCommonOperations))
+          {
+            ((DynValueCommonOperations) this).set_to_null();
+            return;
+          }
+
+        Any member;
+        Streamable holder;
+        Object field;
+        TypeCode fType;
+        Field fField;
+
+        for (int i = 0; i < array.length; i++)
+          {
+            fField = structure.getClass().getField(fNames [ i ]);
+            field = fField.get(structure);
+            fType = array [ i ].type();
+            holder = HolderLocator.createHolder(fType);
+
+            member = createAny();
+            holder.getClass().getField("value").set(holder, field);
+            member.insert_Streamable(holder);
+            member.type(fType);
+
+            array [ i ].from_any(member);
+          }
+
+        if (this instanceof DynValueCommonOperations)
+          ((DynValueCommonOperations) this).set_to_value();
+      }
+    catch (InvalidValue v)
+      {
+        throw v;
+      }
+    catch (NoSuchFieldException ex)
+      {
+        TypeMismatch v =
+          new TypeMismatch("holder value does not match typecode");
+        v.initCause(ex);
+        throw v;
+      }
+    catch (Exception ex)
+      {
+        TypeMismatch t = new TypeMismatch();
+        t.initCause(ex);
+        throw t;
+      }
+  }
+
+// GCJ LOCAL - package private delegates to work around bug in gnuDynValue.
+  int record_component_count()
+  {
+    return component_count();
+  }
+
+  boolean record_equal(DynAny o)
+  {
+    return equal(o);
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/CORBA/DynAn/gnuDynValue.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/CORBA/DynAn/gnuDynValue.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/CORBA/DynAn/gnuDynValue.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/CORBA/DynAn/gnuDynValue.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,386 @@
+/* gnuDynValue.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.DynAn;
+
+import gnu.CORBA.Minor;
+import gnu.CORBA.Unexpected;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.VM_TRUNCATABLE;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ValueFactory;
+import org.omg.DynamicAny.DynAny;
+import org.omg.DynamicAny.DynAnyPackage.InvalidValue;
+import org.omg.DynamicAny.DynAnyPackage.TypeMismatch;
+import org.omg.DynamicAny.DynStruct;
+import org.omg.DynamicAny.DynValue;
+import org.omg.DynamicAny.DynValueCommon;
+import org.omg.DynamicAny.DynValueOperations;
+import org.omg.DynamicAny.NameDynAnyPair;
+import org.omg.DynamicAny.NameValuePair;
+
+import java.io.Serializable;
+
+/**
+ * Implementation of DynValue.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA at Bioinformatics.org)
+ */
+public class gnuDynValue extends RecordAny implements DynValue,
+  Serializable
+{
+  /**
+   * Use serialVersionUID for interoperability.
+   */
+  private static final long serialVersionUID = 1;
+
+  /**
+   * If true, the value of this ValueType is set to null.
+   */
+  boolean isNull;
+
+  /**
+   * Create an instance.
+   */
+  public gnuDynValue(TypeCode oType, TypeCode aType,
+    gnuDynAnyFactory aFactory, ORB anOrb
+  )
+  {
+    super(oType, aType, aFactory, anOrb);
+
+    // Initialise fields. The array of fields also includes all inherited
+    // fields.
+    try
+      {
+        array = new DynAny[ final_type.member_count() ];
+        fNames = new String[ array.length ];
+        for (int i = 0; i < array.length; i++)
+          {
+            array [ i ] =
+              factory.create_dyn_any_from_type_code(final_type.member_type(i));
+            fNames [ i ] = final_type.member_name(i);
+          }
+
+        // Search of inherited members.
+        if (final_type.type_modifier() == VM_TRUNCATABLE.value)
+          {
+            TypeCode parent = final_type.concrete_base_type();
+            DynAny ancestor = factory.create_dyn_any_from_type_code(parent);
+
+            if (ancestor instanceof DynValue)
+              {
+                // Add members of ancestor in front of the curren members.
+                DynValue anc = (DynValue) ancestor;
+                anc.set_to_value();
+
+                NameDynAnyPair[] aar = anc.get_members_as_dyn_any();
+                inheritFields(aar);
+              }
+            else if (ancestor instanceof DynStruct)
+              {
+                // Add members of ancestor in front of the curren members.
+                DynStruct anc = (DynStruct) ancestor;
+                NameDynAnyPair[] aar = anc.get_members_as_dyn_any();
+                inheritFields(aar);
+              }
+            else
+              throw new BAD_PARAM("The parent of " + final_type.id() + ", " +
+                parent.id() + ", is not structure nor value."
+              );
+          }
+      }
+    catch (Exception e)
+      {
+        throw new Unexpected(e);
+      }
+
+    set_to_null();
+  }
+
+  /**
+   * Inherit the provided fields.
+   */
+  private void inheritFields(NameDynAnyPair[] aar)
+  {
+    DynAny[] nArray = new DynAny[ array.length + aar.length ];
+    String[] nNames = new String[ array.length + aar.length ];
+    int p = 0;
+    for (int i = 0; i < aar.length; i++)
+      {
+        nArray [ p ] = aar [ i ].value;
+        nNames [ p ] = aar [ i ].id;
+        p++;
+      }
+
+    for (int i = 0; i < array.length; i++)
+      {
+        nArray [ p ] = array [ i ];
+        nNames [ p ] = fNames [ i ];
+        p++;
+      }
+
+    array = nArray;
+    fNames = nNames;
+  }
+
+  /** @inheritDoc */
+  public TCKind current_member_kind() throws TypeMismatch, InvalidValue
+  {
+    if (isNull)
+      throw new TypeMismatch(ISNULL);
+    else
+      return super.current_member_kind();
+  }
+  ;
+
+  /** @inheritDoc */
+  public String current_member_name() throws TypeMismatch, InvalidValue
+  {
+    if (isNull)
+      throw new TypeMismatch(ISNULL);
+    else
+      return super.current_member_name();
+  }
+  ;
+
+  /** @inheritDoc */
+  public NameDynAnyPair[] get_members_as_dyn_any() throws InvalidValue
+  {
+    if (isNull)
+      throw new InvalidValue(ISNULL);
+    return super.gnu_get_members_as_dyn_any();
+  }
+  ;
+
+  /** @inheritDoc */
+  public NameValuePair[] get_members() throws InvalidValue
+  {
+    if (isNull)
+      throw new InvalidValue(ISNULL);
+    else
+      return super.gnu_get_members();
+  }
+  ;
+
+  /** @inheritDoc */
+  public void set_members_as_dyn_any(NameDynAnyPair[] value)
+    throws TypeMismatch, InvalidValue
+  {
+    super.set_members_as_dyn_any(value);
+    isNull = false;
+  }
+  ;
+
+  /** @inheritDoc */
+  public void set_members(NameValuePair[] value)
+    throws TypeMismatch, InvalidValue
+  {
+    super.set_members(value);
+    isNull = false;
+  }
+  ;
+
+  /** @inheritDoc */
+  public boolean is_null()
+  {
+    return isNull;
+  }
+
+  /** @inheritDoc */
+  public void set_to_null()
+  {
+    isNull = true;
+    valueChanged();
+  }
+
+  /** @inheritDoc */
+  public void set_to_value()
+  {
+    isNull = false;
+    valueChanged();
+  }
+
+  /**
+   * Create a new instance.
+   */
+  protected RecordAny newInstance(TypeCode oType, TypeCode aType,
+    gnuDynAnyFactory aFactory, ORB anOrb
+  )
+  {
+    gnuDynValue v = new gnuDynValue(oType, aType, aFactory, anOrb);
+    if (isNull)
+      v.set_to_null();
+    else
+      v.set_to_value();
+    return v;
+  }
+
+  /**
+   * Compare for equality, minding null values.
+   */
+  public boolean equal(DynAny other)
+  {
+    if (other instanceof DynValueOperations)
+      {
+        DynValueCommon o = (DynValueCommon) other;
+        if (isNull)
+          return o.is_null() && o.type().equal(official_type);
+        else
+          return !o.is_null() && record_equal(other); // GCJ LOCAL bug #24938
+      }
+    else
+      return false;
+  }
+
+  /**
+   * Get the focused component, throwing exception if the current value is null.
+   */
+  protected DynAny focused() throws InvalidValue, TypeMismatch
+  {
+    if (isNull)
+      throw new TypeMismatch(ISNULL);
+    else
+      return super.focused();
+  }
+
+  /**
+   * Convert into Any.
+   */
+  public Any to_any()
+  {
+    if (isNull)
+      {
+        Any a0 = createAny();
+        a0.type(orb.get_primitive_tc(TCKind.tk_null));
+        return a0;
+      }
+    else
+      {
+        try
+          {
+            ValueFactory factory =
+              ((org.omg.CORBA_2_3.ORB) orb).lookup_value_factory(official_type.id());
+            if (factory == null)
+              {
+                MARSHAL m = new MARSHAL("Factory for " + official_type.id() +
+                " not registered.");
+                m.minor = Minor.Factory;
+                throw m;
+              }
+
+            OutputStream out = orb.create_output_stream();
+
+            for (int i = 0; i < array.length; i++)
+              array [ i ].to_any().write_value(out);
+
+            org.omg.CORBA_2_3.portable.InputStream in =
+              (org.omg.CORBA_2_3.portable.InputStream) out.create_input_stream();
+            Serializable v = factory.read_value(in);
+
+            Any g = createAny();
+            g.type(official_type);
+            g.insert_Value(v, official_type);
+
+            return g;
+          }
+        catch (Exception e)
+          {
+            throw new Unexpected(e);
+          }
+      }
+  }
+
+  /** @inheritDoc */
+  public void assign(DynAny from) throws TypeMismatch
+  {
+    checkType(official_type, from.type());
+
+    if (from instanceof DynValue)
+      {
+        DynValue other = (DynValue) from;
+        if (other.is_null())
+          set_to_null();
+        else
+          {
+            set_to_value();
+            try
+              {
+                DynValueOperations src = (DynValueOperations) from;
+                set_members_as_dyn_any(src.get_members_as_dyn_any());
+              }
+            catch (InvalidValue e)
+              {
+                TypeMismatch t = new TypeMismatch("Invalid value");
+                t.initCause(e);
+                throw t;
+              }
+          }
+      }
+    else
+      throw new TypeMismatch("Not a DynValue");
+  }
+
+  /**
+   * Get the number of components.
+   */
+  public int component_count()
+  {
+    return isNull ? 0 : record_component_count(); // GCJ LOCAL bug #24938
+  }
+
+  /** {@inheritDoc} */
+  public Serializable get_val() throws TypeMismatch, InvalidValue
+  {
+    return to_any().extract_Value();
+  }
+
+  /** {@inheritDoc} */
+  public void insert_val(Serializable a_x) throws InvalidValue, TypeMismatch
+  {
+    Any a = to_any();
+    a.insert_Value(a_x);
+    from_any(a);
+    valueChanged();
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/CORBA/ObjectCreator.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/CORBA/ObjectCreator.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/CORBA/ObjectCreator.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/CORBA/ObjectCreator.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,596 @@
+/* ObjectCreator.java --
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import gnu.CORBA.CDR.UnknownExceptionCtxHandler;
+import gnu.CORBA.CDR.BufferredCdrInput;
+import gnu.CORBA.CDR.BufferedCdrOutput;
+import gnu.CORBA.CDR.AbstractCdrInput;
+import gnu.CORBA.GIOP.ServiceContext;
+import gnu.CORBA.typecodes.RecordTypeCode;
+// GCJ LOCAL - We don't have this yet.
+// import gnu.classpath.VMStackWalker;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.CompletionStatus;
+import org.omg.CORBA.CompletionStatusHelper;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.SystemException;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.UNKNOWN;
+import org.omg.CORBA.UserException;
+import org.omg.CORBA.portable.IDLEntity;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ValueBase;
+
+import java.lang.reflect.Method;
+import java.util.Map;
+import java.util.WeakHashMap;
+
+import javax.rmi.CORBA.Util;
+
+/**
+ * Creates java objects from the agreed IDL names for the simple case when the
+ * CORBA object is directly mapped into the locally defined java class.
+ * 
+ * @author Audrius Meskauskas (AudriusA at Bioinformatics.org)
+ */
+public class ObjectCreator
+{
+  /**
+   * The standard OMG prefix.
+   */
+  public static final String OMG_PREFIX = "omg.org/";
+
+  /**
+   * The standard java prefix.
+   */
+  public static final String JAVA_PREFIX = "org.omg.";
+
+  /**
+   * The prefix for classes that are placed instide the gnu.CORBA namespace.
+   */
+  public static final String CLASSPATH_PREFIX = "gnu.CORBA.";
+
+  /**
+   * Maps classes to they IDL or RMI names. Computing RMI name is an expensive
+   * operations, so frequently used RMI keys are reused. The map must be weak to
+   * ensure that the class can be unloaded, when applicable.
+   */
+  public static Map m_names = new WeakHashMap();
+
+  /**
+   * Maps IDL strings into known classes. The map must be weak to ensure that
+   * the class can be unloaded, when applicable.
+   */
+  public static Map m_classes = new WeakHashMap();
+
+  /**
+   * Maps IDL types to they helpers.
+   */
+  public static Map m_helpers = new WeakHashMap();
+
+  /**
+   * Try to instantiate an object with the given IDL name. The object must be
+   * mapped to the local java class. The omg.org domain must be mapped into the
+   * object in either org/omg or gnu/CORBA namespace.
+   * 
+   * @param IDL name
+   * @return instantiated object instance or null if no such available.
+   */
+  public static java.lang.Object createObject(String idl, String suffix)
+  {
+    synchronized (m_classes)
+      {
+        Class known = (Class) (suffix == null ? m_classes.get(idl)
+          : m_classes.get(idl + 0xff + suffix));
+        Object object;
+
+        if (known != null)
+          {
+            try
+              {
+                return known.newInstance();
+              }
+            catch (Exception ex)
+              {
+                RuntimeException rex = new RuntimeException(idl + " suffix "
+                  + suffix, ex);
+                throw rex;
+              }
+          }
+        else
+          {
+            if (suffix == null)
+              suffix = "";
+            try
+              {
+                known = forName(toClassName(JAVA_PREFIX, idl) + suffix);
+                object = known.newInstance();
+              }
+            catch (Exception ex)
+              {
+                try
+                  {
+                    known = forName(toClassName(CLASSPATH_PREFIX, idl)
+                      + suffix);
+                    object = known.newInstance();
+                  }
+                catch (Exception exex)
+                  {
+                    return null;
+                  }
+              }
+            m_classes.put(idl + 0xff + suffix, known);
+            return object;
+          }
+      }
+  }
+
+  /**
+   * Read the system exception from the given stream.
+   * 
+   * @param input the CDR stream to read from.
+   * @param contexts the service contexts in request/reply header/
+   * 
+   * @return the exception that has been stored in the stream (IDL name, minor
+   * code and completion status).
+   */
+  public static SystemException readSystemException(InputStream input,
+    ServiceContext[] contexts)
+  {
+    SystemException exception;
+
+    String idl = input.read_string();
+    int minor = input.read_ulong();
+    CompletionStatus completed = CompletionStatusHelper.read(input);
+
+    try
+      {
+        exception = (SystemException) createObject(idl, null);
+        exception.minor = minor;
+        exception.completed = completed;
+      }
+    catch (Exception ex)
+      {
+        UNKNOWN u = new UNKNOWN("Unsupported system exception " + idl, minor,
+          completed);
+        u.initCause(ex);
+        throw u;
+      }
+
+    try
+      {
+        // If UnknownExceptionInfo is present in the contexts, read it and
+        // set as a cause of this exception.
+        ServiceContext uEx = ServiceContext.find(
+          ServiceContext.UnknownExceptionInfo, contexts);
+
+        if (uEx != null)
+          {
+            BufferredCdrInput in = new BufferredCdrInput(uEx.context_data);
+            in.setOrb(in.orb());
+            if (input instanceof AbstractCdrInput)
+              {
+                ((AbstractCdrInput) input).cloneSettings(in);
+              }
+
+            Throwable t = UnknownExceptionCtxHandler.read(in, contexts);
+            exception.initCause(t);
+          }
+      }
+    catch (Exception ex)
+      {
+        // Unsupported context format. Do not terminate as the user program may
+        // not need it.
+      }
+
+    return exception;
+  }
+
+  /**
+   * Reads the user exception, having the given Id, from the input stream. The
+   * id is expected to be in the form like
+   * 'IDL:test/org/omg/CORBA/ORB/communication/ourUserException:1.0'
+   * 
+   * @param idl the exception idl name.
+   * @param input the stream to read from.
+   * 
+   * @return the loaded exception.
+   * @return null if the helper class cannot be found.
+   */
+  public static UserException readUserException(String idl, InputStream input)
+  {
+    try
+      {
+        Class helperClass = findHelper(idl);
+
+        Method read = helperClass.getMethod("read",
+          new Class[] { org.omg.CORBA.portable.InputStream.class });
+
+        return (UserException) read.invoke(null, new Object[] { input });
+      }
+    catch (MARSHAL mex)
+      {
+        // This one is ok to throw
+        throw mex;
+      }
+    catch (Exception ex)
+      {
+        ex.printStackTrace();
+        return null;
+      }
+  }
+
+  /**
+   * Gets the helper class name from the string like
+   * 'IDL:test/org/omg/CORBA/ORB/communication/ourUserException:1.0'
+   * 
+   * @param IDL the idl name.
+   */
+  public static String toHelperName(String IDL)
+  {
+    String s = IDL;
+    int a = s.indexOf(':') + 1;
+    int b = s.lastIndexOf(':');
+
+    s = IDL.substring(a, b);
+
+    if (s.startsWith(OMG_PREFIX))
+      s = JAVA_PREFIX + s.substring(OMG_PREFIX.length());
+
+    return s.replace('/', '.') + "Helper";
+  }
+
+  /**
+   * Writes the system exception data to CDR output stream.
+   * 
+   * @param output a stream to write data to.
+   * @param ex an exception to write.
+   */
+  public static void writeSystemException(OutputStream output,
+    SystemException ex)
+  {
+    String exIDL = getRepositoryId(ex.getClass());
+    output.write_string(exIDL);
+    output.write_ulong(ex.minor);
+    CompletionStatusHelper.write(output, ex.completed);
+  }
+
+  /**
+   * Converts the given IDL name to class name.
+   * 
+   * @param IDL the idl name.
+   * 
+   */
+  protected static String toClassName(String prefix, String IDL)
+  {
+    String s = IDL;
+    int a = s.indexOf(':') + 1;
+    int b = s.lastIndexOf(':');
+
+    s = IDL.substring(a, b);
+
+    if (s.startsWith(OMG_PREFIX))
+      s = prefix + s.substring(OMG_PREFIX.length());
+
+    return s.replace('/', '.');
+  }
+
+  /**
+   * Converts the given IDL name to class name and tries to load the matching
+   * class. The OMG prefix (omg.org) is replaced by the java prefix org.omg. No
+   * other prefixes are added.
+   * 
+   * @param IDL the idl name.
+   * 
+   * @return the matching class or null if no such is available.
+   */
+  public static Class Idl2class(String IDL)
+  {
+    synchronized (m_classes)
+      {
+        Class c = (Class) m_classes.get(IDL);
+
+        if (c != null)
+          return c;
+        else
+          {
+            String s = IDL;
+            int a = s.indexOf(':') + 1;
+            int b = s.lastIndexOf(':');
+
+            s = IDL.substring(a, b);
+
+            if (s.startsWith(OMG_PREFIX))
+              s = JAVA_PREFIX + s.substring(OMG_PREFIX.length());
+
+            String cn = s.replace('/', '.');
+
+            try
+              {
+                c = forName(cn);
+                m_classes.put(IDL, c);
+                return c;
+              }
+            catch (ClassNotFoundException ex)
+              {
+                return null;
+              }
+          }
+      }
+  }
+
+  /**
+   * Converts the given IDL name to class name, tries to load the matching class
+   * and create an object instance with parameterless constructor. The OMG
+   * prefix (omg.org) is replaced by the java prefix org.omg. No other prefixes
+   * are added.
+   * 
+   * @param IDL the idl name.
+   * 
+   * @return instantiated object instance or null if such attempt was not
+   * successful.
+   */
+  public static java.lang.Object Idl2Object(String IDL)
+  {
+    Class cx = Idl2class(IDL);
+
+    try
+      {
+        if (cx != null)
+          return cx.newInstance();
+        else
+          return null;
+      }
+    catch (Exception ex)
+      {
+        return null;
+      }
+  }
+
+  /**
+   * Convert the class name to IDL or RMI name (repository id). If the class
+   * inherits from IDLEntity, ValueBase or SystemException, returns repository
+   * Id in the IDL:(..) form. If it does not, returns repository Id in the
+   * RMI:(..) form.
+   * 
+   * @param cx the class for that the name must be computed.
+   * 
+   * @return the idl or rmi name.
+   */
+  public static synchronized String getRepositoryId(Class cx)
+  {
+    String name = (String) m_names.get(cx);
+    if (name != null)
+      return name;
+
+    String cn = cx.getName();
+    if (!(IDLEntity.class.isAssignableFrom(cx)
+      || ValueBase.class.isAssignableFrom(cx) || SystemException.class.isAssignableFrom(cx)))
+      {
+        // Not an IDL entity.
+        name = Util.createValueHandler().getRMIRepositoryID(cx);
+      }
+    else
+      {
+        if (cn.startsWith(JAVA_PREFIX))
+          cn = OMG_PREFIX
+            + cn.substring(JAVA_PREFIX.length()).replace('.', '/');
+        else if (cn.startsWith(CLASSPATH_PREFIX))
+          cn = OMG_PREFIX
+            + cn.substring(CLASSPATH_PREFIX.length()).replace('.', '/');
+
+        name = "IDL:" + cn + ":1.0";
+      }
+    m_names.put(cx, name);
+    return name;
+  }
+
+  /**
+   * Insert the passed parameter into the given Any, assuming that the helper
+   * class is available. The helper class must have the "Helper" suffix and be
+   * in the same package as the class of the object being inserted.
+   * 
+   * @param into the target to insert.
+   * 
+   * @param object the object to insert. It can be any object as far as the
+   * corresponding helper is provided.
+   * 
+   * @return true on success, false otherwise.
+   */
+  public static boolean insertWithHelper(Any into, Object object)
+  {
+    try
+      {
+        String helperClassName = object.getClass().getName() + "Helper";
+        Class helperClass = forName(helperClassName);
+
+        Method insert = helperClass.getMethod("insert", new Class[] {
+          Any.class, object.getClass() });
+
+        insert.invoke(null, new Object[] { into, object });
+
+        return true;
+      }
+    catch (Exception exc)
+      {
+        // Failed due some reason.
+        return false;
+      }
+  }
+
+  /**
+   * Insert the system exception into the given Any.
+   */
+  public static boolean insertSysException(Any into, SystemException exception)
+  {
+    try
+      {
+        BufferedCdrOutput output = new BufferedCdrOutput();
+
+        String m_exception_id = getRepositoryId(exception.getClass());
+        output.write_string(m_exception_id);
+        output.write_ulong(exception.minor);
+        CompletionStatusHelper.write(output, exception.completed);
+
+        String name = getDefaultName(m_exception_id);
+
+        GeneralHolder h = new GeneralHolder(output);
+
+        into.insert_Streamable(h);
+
+        RecordTypeCode r = new RecordTypeCode(TCKind.tk_except);
+        r.setId(m_exception_id);
+        r.setName(name);
+        into.type(r);
+
+        return true;
+      }
+    catch (Exception ex)
+      {
+        ex.printStackTrace();
+        return false;
+      }
+  }
+
+  /**
+   * Get the type name from the IDL string.
+   */
+  public static String getDefaultName(String idl)
+  {
+    int f1 = idl.lastIndexOf("/");
+    int p1 = (f1 < 0) ? 0 : f1;
+    int p2 = idl.indexOf(":", p1);
+    if (p2 < 0)
+      p2 = idl.length();
+
+    String name = idl.substring(f1 + 1, p2);
+    return name;
+  }
+
+  /**
+   * Insert this exception into the given Any. On failure, insert the UNKNOWN
+   * exception.
+   */
+  public static void insertException(Any into, Throwable exception)
+  {
+    boolean ok = false;
+    if (exception instanceof SystemException)
+      ok = insertSysException(into, (SystemException) exception);
+    else if (exception instanceof UserException)
+      ok = insertWithHelper(into, exception);
+
+    if (!ok)
+      ok = insertSysException(into, new UNKNOWN());
+    if (!ok)
+      throw new InternalError("Exception wrapping broken");
+  }
+
+  /**
+   * Find helper for the class with the given name.
+   */
+  public static Class findHelper(String idl)
+  {
+    synchronized (m_helpers)
+      {
+        Class c = (Class) m_helpers.get(idl);
+        if (c != null)
+          return c;
+        try
+          {
+            String helper = toHelperName(idl);
+            c = forName(helper);
+
+            m_helpers.put(idl, c);
+            return c;
+          }
+        catch (Exception ex)
+          {
+            return null;
+          }
+      }
+  }
+  
+  /**
+   * Load the class with the given name. This method tries to use the context
+   * class loader first. If this fails, it searches for the suitable class
+   * loader in the caller stack trace. This method is a central point where all
+   * requests to find a class by name are delegated.
+   */
+  public static Class forName(String className) throws ClassNotFoundException
+  {
+    try
+      {
+        return Class.forName(className, true,
+                             Thread.currentThread().getContextClassLoader());
+      }
+    catch (ClassNotFoundException nex)
+      {
+        /**
+         * Returns the first user defined class loader on the call stack, or
+         * null when no non-null class loader was found.
+         */
+
+// GCJ LOCAL - We don't have VMStackWalker yet.
+// We only try the SystemClassLoader for now.
+//        Class[] ctx = VMStackWalker.getClassContext();
+//        for (int i = 0; i < ctx.length; i++)
+//          {
+//            // Since we live in a class loaded by the bootstrap
+//            // class loader, getClassLoader is safe to call without
+//            // needing to be wrapped in a privileged action.
+//            ClassLoader cl = ctx[i].getClassLoader();
+	    ClassLoader cl = ClassLoader.getSystemClassLoader();
+            try
+              {
+                if (cl != null)
+                  return Class.forName(className, true, cl);
+              }
+            catch (ClassNotFoundException nex2)
+              {
+                // Try next.
+              }
+//          }
+
+      }
+    throw new ClassNotFoundException(className);
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/LightweightRedirector.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/LightweightRedirector.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/LightweightRedirector.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/LightweightRedirector.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,183 @@
+/* Copyright (C) 2000  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt;
+
+import java.awt.AWTEvent;
+import java.awt.AWTError;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.event.MouseEvent;
+import java.awt.event.InputEvent;
+
+/**
+ * Encapsulates the logic required to dispatch events to the correct
+ * component in a component tree that may contain lightweight
+ * components. Toolkits typically only identify heavyweight components
+ * as the source of events. This class redirects the events to the
+ * appropriate lightweight children of the heavyweight component.
+ */
+public class LightweightRedirector
+{
+  final static int LAST_BUTTON_NUMBER = 3;
+
+  /* We sacrifice one array element to allow the button number to 
+     match the index of this array. */
+  Component[] releaseTargets = new Component[LAST_BUTTON_NUMBER+1];
+
+  /** 
+   *
+   * Modifies or replaces the given event with an event that has been
+   * properly redirected.  State of button presses are kept so that
+   * button releases can be redirected to the same component as the
+   * button press.  It is required that all events are sent through
+   * this method in chronological order.
+   */
+  public AWTEvent redirect(AWTEvent event)
+  {
+    if (event instanceof MouseEvent)
+      return redirectMouse((MouseEvent) event);
+
+    /* In case we don't know how to redirect the event, simply return
+       the event unchanged. */
+    return event;
+  }
+
+  MouseEvent redirectMouse(MouseEvent event)
+  {
+    int button = getButtonNumber(event);
+    int id = event.getID();
+
+    Component heavySource = (Component) event.getSource();
+    Component source = heavySource;
+    int x = event.getX();
+    int y = event.getY();
+
+    if (id == MouseEvent.MOUSE_RELEASED)
+      {
+	Component target = releaseTargets[button];
+
+	if (target != null)
+	  {
+	    releaseTargets[button] = null;
+	    source = target;
+
+	    Component child = source;
+	    while (child != heavySource)
+	      {
+		x -= child.getX();
+		y -= child.getY();
+		child = child.getParent();
+		if (child == null)
+		  System.err.println("warning, orphaned release target");
+	      }
+	  }
+      }
+    else
+      {
+	/* Find real component, and adjust source, x and y
+	   accordingly. */
+	
+	while (true)
+	  {
+	    Component parent = source;
+	    
+	    Component child = parent.getComponentAt(x, y);
+	    
+	    if (parent == child)
+	      break;
+	    
+	    // maybe ignoring would be better?
+	    if (child == null)
+	      {
+		String msg = "delivered event not within component. " +
+		  "Heavyweight source was " + heavySource + ". " +
+		  "Component was " + parent;
+		throw new AWTError(msg);
+	      }
+	    if (child.isLightweight())
+	      {
+		// descend down to child
+		source = child;
+		x -= child.getX();
+		y -= child.getY();
+	      }
+	    else
+	      {
+		System.err.println("warning: event delivered to wrong " +
+				   "heavyweight component. Was " +
+				   "delivered to " + source + ". " +
+				   "Should have been delivered to " +
+				   child + ". Maybe the native window " +
+				   "system is bubbling events up the " +
+				   "containment hierarchy.");
+		break;
+	      }
+	  }
+	
+	/* ensure that the release event is delivered to the same
+	   component as the press event. For most toolkits this is
+	   only necessary for lightweight components, since the
+	   underlying windowing system takes care of its heavyweight
+	   components. */
+	if (id == MouseEvent.MOUSE_PRESSED)
+	  releaseTargets[button] = source;
+      }
+    
+    
+    if (source == heavySource)
+      return event; // no change in event
+    
+    // print warning for heavyweights
+    /* this warning can safely be removed if a toolkit that
+       needs heavyweight redirection support is ever created. */
+    if (!source.isLightweight())
+      System.err.println("warning: redirecting to heavyweight");
+    
+    MouseEvent redirected = new MouseEvent(source, event.getID(),
+					   event.getWhen(),
+					   event.getModifiersEx(),
+					   x, y,
+					   event.getClickCount(),
+					   event.isPopupTrigger());
+    
+    return redirected;
+  }
+  
+  /**
+   * Identifies the button number for an input event.
+   * 
+   * @returns the button number, or 0 if no button modifier was set
+   * for the event.
+   */
+  int getButtonNumber(InputEvent event)
+  {
+    int modifiers = event.getModifiersEx();
+    
+    modifiers &=
+      InputEvent.BUTTON1_DOWN_MASK |
+      InputEvent.BUTTON2_DOWN_MASK |
+      InputEvent.BUTTON3_DOWN_MASK;
+    
+    switch (modifiers)
+      {
+      case InputEvent.BUTTON1_DOWN_MASK:
+	return 1;
+      case InputEvent.BUTTON2_DOWN_MASK:
+	return 2;
+      case InputEvent.BUTTON3_DOWN_MASK:
+	return 3;
+      case 0:
+	return 0;
+
+      default:
+	System.err.println("FIXME: multibutton event");
+	return 0;
+      }
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/AbstractGraphicsState.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/AbstractGraphicsState.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/AbstractGraphicsState.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/AbstractGraphicsState.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,141 @@
+/* Copyright (C) 2000, 2001  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.j2d;
+
+import java.awt.Color;
+import java.awt.Image;
+import java.awt.Shape;
+import java.awt.Rectangle;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.image.ImageObserver;
+
+/**
+ * Base class for graphics state objects (State pattern, GOF book)
+ * that represents the current pipeline configuration. The Graphics2D
+ * object forwards most of the requests to the state object. The
+ * Graphics2D object itself only administers properties that are not
+ * specific for a certain state.
+ */
+public abstract class AbstractGraphicsState implements Cloneable
+{
+  Graphics2DImpl frontend;
+
+  public void setFrontend(Graphics2DImpl frontend)
+  {
+    this.frontend = frontend;
+  }
+  
+  public void dispose()
+  {
+    frontend = null;
+  }
+
+  // -------- Graphics methods:
+  
+  public abstract void setColor(Color color);
+
+  public abstract void setPaintMode();
+
+  public abstract void setXORMode(Color altColor);
+
+  public abstract void setFont(Font font);
+
+  public abstract FontMetrics getFontMetrics(Font font);
+
+  public abstract void setClip(Shape clip);
+
+  public abstract Shape getClip();
+  public abstract Rectangle getClipBounds();
+
+  public abstract void copyArea(int x, int y, 
+				int width, int height,
+				int dx, int dy);
+
+  public abstract void drawLine(int x1, int y1,
+				int x2, int y2);
+  
+  public abstract void fillRect(int x, int y,
+				int width, int height);
+  
+  public abstract void clearRect(int x, int y,
+				 int width, int height);
+  
+  public abstract void drawRoundRect(int x, int y,
+				     int width, int height,
+				     int arcWidth, int arcHeight);
+  
+  public abstract void fillRoundRect(int x, int y,
+				     int width, int height,
+				     int arcWidth, int arcHeight);
+  
+  public abstract void drawOval(int x, int y,
+				int width, int height);
+  
+  public abstract void fillOval(int x, int y,
+				int width, int height);
+  
+  public abstract void drawArc(int x, int y,
+			       int width, int height,
+			       int startAngle, int arcAngle);
+  
+  public abstract void fillArc(int x, int y,
+			       int width, int height,
+			       int startAngle, int arcAngle);
+  
+  public abstract void drawPolyline(int[] xPoints, int[] yPoints,int nPoints);
+
+  public abstract void drawPolygon(int[] xPoints, int[] yPoints, int nPoints);
+    
+  public abstract void fillPolygon(int[] xPoints, int[] yPoints, int nPoints);
+
+  public abstract boolean drawImage(Image image, int x, int y,
+				    ImageObserver observer);
+    
+
+  // -------- Graphics2D methods:
+
+  public abstract void draw(Shape shape);
+
+  public abstract void fill(Shape shape);
+    
+  public abstract boolean hit(Rectangle rect, Shape text, boolean onStroke);
+  
+  public abstract void drawString(String text, int x, int y);
+  
+  public abstract void drawString(String text, float x, float y);
+  
+  public abstract void translate(int x, int y);
+  
+  public abstract void translate(double tx, double ty);
+  
+  public abstract void rotate(double theta);
+  
+  public abstract void rotate(double theta, double x, double y);
+  
+  public abstract void scale(double scaleX, double scaleY);
+  
+  public abstract void shear(double shearX, double shearY);
+
+  public Object clone ()
+  {
+    try
+      {
+	return super.clone ();
+      }
+    catch (CloneNotSupportedException ex)
+      {
+	// This should never happen.
+	throw new InternalError ();
+      }
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/DirectRasterGraphics.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/DirectRasterGraphics.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/DirectRasterGraphics.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/DirectRasterGraphics.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,85 @@
+/* Copyright (C) 2000, 2003  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.j2d;
+
+import java.awt.Color;
+import java.awt.Image;
+import java.awt.Shape;
+import java.awt.Rectangle;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.image.Raster;
+import java.awt.image.ImageObserver;
+
+/**
+ * Interface for a simple pixel based backend graphics object that
+ * does not handle translation/transforms, curves, nor advanced
+ * compositing.
+ */
+public interface DirectRasterGraphics extends Cloneable
+{
+  void dispose();
+  
+  void setColor(Color color);
+  
+  void setPaintMode();
+  
+  void setXORMode(Color altColor);
+  
+  void setFont(Font font);
+  
+  FontMetrics getFontMetrics(Font font);
+  
+  // supports rects, multi-rects and polygons
+  void setClip(Shape clip);
+  
+  void copyArea(int x, int y, int width, int height,
+		       int dx, int dy);
+  
+  void drawLine(int x1, int y1, int x2, int y2);
+  
+  void drawRect(int x, int y, int width, int height);
+  
+  void fillRect(int x, int y, int width, int height);
+  
+  void drawArc(int x, int y, int width, int height,
+		      int startAngle, int arcAngle);
+  
+  void fillArc(int x, int y, int width, int height,
+		      int startAngle, int arcAngle);
+  
+  void drawPolyline(int[] xPoints, int[] yPoints, int nPoints);
+  
+  void drawPolygon(int[] xPoints, int[] yPoints, int nPoints);
+  
+  void fillPolygon(int[] xPoints, int[] yPoints, int nPoints,
+			  int translateX, int translateY);
+  
+  void drawString(String str, int x, int y);
+  
+  boolean drawImage(Image image, int x, int y,
+			   ImageObserver observer);
+
+  /**
+   * Map the data for screen pixels in the requested bounds to a
+   * raster object.  This gives read/write access to the screen
+   * pixels, allowing neat alpha and composite tricks.
+   */
+  MappedRaster mapRaster(Rectangle bounds);
+  
+  /**
+   * Detach previously mapped pixel data from a raster object.
+   */
+  void unmapRaster(MappedRaster mappedRaster);
+  
+  Object clone();
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/Graphics2DImpl.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/Graphics2DImpl.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/Graphics2DImpl.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/Graphics2DImpl.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,545 @@
+/* Copyright (C) 2000, 2002, 2003  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.j2d;
+
+import java.awt.Color;
+import java.awt.Composite;
+import java.awt.Image;
+import java.awt.Shape;
+import java.awt.Rectangle;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Paint;
+import java.awt.RenderingHints;
+import java.awt.Stroke;
+import java.awt.font.FontRenderContext;
+import java.awt.font.GlyphVector;
+import java.awt.geom.AffineTransform;
+import java.awt.image.ImageObserver;
+import java.awt.image.BufferedImage;
+import java.awt.image.BufferedImageOp;
+import java.awt.image.RenderedImage;
+import java.awt.image.renderable.RenderableImage;
+import java.text.AttributedCharacterIterator;
+import java.util.Map;
+
+/**
+ * Delegates almost all work to a state object, that allows us to
+ * hot-swap rendering strategies based on state changes inflicted on
+ * this Graphics object. This class keeps track of properties that are
+ * not affected by the state, (such as clip shape,
+ * foreground/background color, font, etc.).
+ *
+ * <p>The far front-end of the rendering pipeline consists of the
+ * Graphics2D API. In the far back-end, lies the native graphics
+ * libraries. In most cases the native graphics libraries only have
+ * direct support for a subset of the properties of Graphics2D. To
+ * make up missing features in the native graphics libraries, the
+ * pipeline between the front-end and the back-end need to translate
+ * drawing request to primitive operations that are supported by the
+ * back-end. E.g. for X11, drawing a straight line will translate to
+ * an XDrawLine, drawing a bezier curve will trigger flattening of the
+ * curve and will result in a call to XDrawLines.
+ *
+ * <p>This is the basic strategy for the rendering pipeline: Whenever
+ * a graphics property change occurs, that causes the current pipeline
+ * to be insufficient, amend or replace parts of the pipeline so that
+ * the pipeline will once again be able to translate requests to the
+ * set of primitives supported by the native graphics library.
+ *
+ * <p>Most graphics libraries share common subsets of
+ * functionality. To be able to reuse pieces of the rendering pipeline
+ * for several backends, we define interfaces that describe subsets of
+ * characteristics supported by the backends. A wrapper for the native
+ * library can implement several interfaces to describe its range of
+ * functionality.
+ *
+ * <p>Typically, most painting is done with a graphics object with
+ * simple properties. Unless one is using a complex Look & Feel, the
+ * painting of Swing components will never require affine transforms,
+ * alpha blending, non-rectangular clipping, etc. When graphics
+ * objects are created, they start off in a state where all the
+ * properties are simple. Most graphics objects experience only
+ * trivial property changes, and never leave this simple state. It is
+ * therefore wise to ensure that the rendering pipeline for this
+ * initial state is lean and as much as possible plugs directly into
+ * the backend.
+ *
+ * <p>The initial state for graphics object of most raster displays
+ * would call for two levels of indirection:
+ *
+ * <pre>
+ * Graphics2D object ---> IntegerGraphicsState ---> DirectRasterGraphics
+ * </pre>
+ */
+public class Graphics2DImpl extends Graphics2D implements Cloneable
+{
+  GraphicsConfiguration config;
+
+  AbstractGraphicsState state;
+    
+  Color fg;
+  Color bg;
+
+  Font font;
+  
+  public Graphics2DImpl(GraphicsConfiguration config)
+  {
+    this.config = config;
+  }
+  
+  public void setState(AbstractGraphicsState state)
+  {
+    this.state = state;
+    this.state.setFrontend(this);
+  }
+    
+  public Object clone()
+  {
+    try
+      {
+	Graphics2DImpl gfxCopy = (Graphics2DImpl) super.clone();
+	AbstractGraphicsState stateCopy =
+	  (AbstractGraphicsState) state.clone();
+	gfxCopy.setState(stateCopy);
+	
+	return gfxCopy;
+      }
+    catch (CloneNotSupportedException ex)
+      {
+	// This should never happen.
+	throw new InternalError ();
+      }
+  }
+
+
+  // -------- Graphics methods:
+
+  public Graphics create()
+  {
+    Graphics2DImpl gfxCopy = (Graphics2DImpl) clone();
+    return gfxCopy;
+  }
+
+  public Color getColor()
+  {
+    return fg;
+  }
+  
+  public void setColor(Color color)
+  {
+    fg = color;
+    state.setColor(color);
+  }
+
+  public void setPaintMode()
+  {
+    state.setPaintMode();
+  }
+
+  public void setXORMode(Color altColor)
+  {
+    state.setXORMode(altColor);
+  }
+
+  public Font getFont()
+  {
+    return font;
+  }
+
+  public void setFont(Font font)
+  {
+    this.font = font;
+    state.setFont(font);
+  }
+    
+  public FontMetrics getFontMetrics(Font font)
+  {
+    return state.getFontMetrics(font);
+  }
+
+  public Rectangle getClipBounds()
+  {
+    return state.getClipBounds();
+  }
+    
+  public void clipRect(int x, int y, int width, int height)
+  {
+    Shape clip = state.getClip();
+    if (clip == null)
+    {
+      clip = new Rectangle (x,y,width,height);
+      setClip (clip);
+      return;
+    }
+    if (clip instanceof Rectangle)
+      {
+	Rectangle clipRect = (Rectangle) clip;
+	clip = clipRect.intersection(new Rectangle(x, y, width, height));
+	setClip(clip);
+	return;
+      }
+	
+    String msg =
+      "intersecting current clip shape " + clip + " with new rectangle " +
+      "has not been implemented yet";
+    throw new UnsupportedOperationException(msg);
+  }
+
+  public void setClip(int x, int y, int width, int height)
+  {
+    Rectangle clip = new Rectangle(x, y, width, height);
+    setClip(clip);
+  }
+
+  public Shape getClip()
+  {
+    return state.getClip();
+  }
+
+  public void setClip(Shape clip)
+  {
+    state.setClip(clip);
+  }
+
+  public void copyArea(int x, int y, int width, int height,
+		       int dx, int dy)
+  {
+    state.copyArea(x, y, width, height, dx, dy);
+  }
+
+  public void drawLine(int x1, int y1, int x2, int y2)
+  {
+    state.drawLine(x1, y1, x2, y2);
+  }
+    
+  public void fillRect(int x, int y, int width, int height)
+  {
+    state.fillRect(x, y, width, height);
+  }
+    
+  public void clearRect(int x, int y, int width, int height)
+  {
+    state.clearRect(x, y, width, height);
+  }
+  
+  public void drawRoundRect(int x, int y, int width, int height,
+			    int arcWidth, int arcHeight)
+  {
+    state.drawRoundRect(x, y, width, height, arcWidth, arcHeight);
+  }
+    
+  public void fillRoundRect(int x, int y, int width, int height,
+			    int arcWidth, int arcHeight)
+  {
+    state.fillRoundRect(x, y, width, height, arcWidth, arcHeight);
+  }
+
+  public void drawOval(int x, int y, int width, int height)
+  {
+    state.drawOval(x, y, width, height);
+  }
+
+  public void fillOval(int x, int y, int width, int height)
+  {
+    state.fillOval(x, y, width, height);
+  }
+
+  public void drawArc(int x, int y, int width, int height,
+		      int startAngle, int arcAngle)
+  {
+    state.drawArc(x, y, width, height, startAngle, arcAngle);
+  }
+
+  public void fillArc(int x, int y, int width, int height,
+		      int startAngle, int arcAngle)
+  {
+    state.fillArc(x, y, width, height, startAngle, arcAngle);
+  }
+
+  public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
+  {
+    state.drawPolyline(xPoints, yPoints, nPoints);
+  }
+  
+  public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
+  {
+    state.drawPolygon(xPoints, yPoints, nPoints);
+  }
+    
+  public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
+  {
+    state.fillPolygon(xPoints, yPoints, nPoints);
+  }
+    
+  public boolean drawImage(Image image, int x, int y,
+			   ImageObserver observer)
+  {
+    return state.drawImage(image, x, y, observer);
+  }
+
+  public boolean drawImage(Image img, int x, int y,
+			   int width, int height,
+			   ImageObserver observer)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public boolean drawImage(Image img, int x, int y, Color bgcolor,
+			   ImageObserver observer)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+  
+  public boolean drawImage(Image img, int x, int y,
+			   int width, int height, Color bgcolor,
+			   ImageObserver observer)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public boolean drawImage(Image img,
+			   int dx1, int dy1, int dx2, int dy2,
+			   int sx1, int sy1, int sx2, int sy2,
+			   ImageObserver observer)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+  
+  public boolean drawImage(Image img,
+			   int dx1, int dy1, int dx2, int dy2,
+			   int sx1, int sy1, int sx2, int sy2,
+			   Color bgcolor, ImageObserver observer)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+  
+  public void dispose()
+  {
+    AbstractGraphicsState lState = state;
+    
+    state = null;
+    config = null;
+    font = null;
+    fg = null;
+    bg = null;
+    
+    if (lState != null)
+      lState.dispose();
+  }
+    
+
+
+  // -------- Graphics2D methods:
+    
+  public void draw(Shape shape)
+  {
+    state.draw(shape);
+  }
+  
+  public boolean drawImage(Image image, AffineTransform xform,
+			   ImageObserver obs)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+
+  public void drawString(String text, int x, int y)
+  {
+    state.drawString(text, x, y);
+  }
+
+  public void drawString(String text, float x, float y)
+  {
+    state.drawString(text, x, y);
+  }
+
+  public void fill(Shape shape)
+  {
+    state.fill(shape);
+  }
+
+  public boolean hit(Rectangle rect, Shape text, boolean onStroke)
+  {
+    return state.hit(rect, text, onStroke);
+  }
+    
+  public GraphicsConfiguration getDeviceConfiguration()
+  {
+    return config;
+  }
+
+  public void setPaint(Paint paint)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public void setRenderingHint(RenderingHints.Key hintKey,
+			       Object hintValue)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+  
+  public Object getRenderingHint(RenderingHints.Key hintKey)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public RenderingHints getRenderingHints()
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+    
+  public void translate(int x, int y)
+  {
+    state.translate(x, y);
+  }
+  
+  public void translate(double tx, double ty)
+  {
+    state.translate(tx, ty);
+  }
+    
+  public void rotate(double theta)
+  {
+    state.rotate(theta);
+  }
+
+  public void rotate(double theta, double x, double y)
+  {
+    state.rotate(theta, x, y);
+  }
+  
+  public void scale(double scaleX, double scaleY)
+  {
+    state.scale(scaleX, scaleY);
+  }
+  
+  public void shear(double shearX, double shearY)
+  {
+    state.shear(shearX, shearY);
+  }
+
+  public void transform(AffineTransform Tx)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public void setTransform(AffineTransform Tx)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+    
+  public AffineTransform getTransform()
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public Paint getPaint()
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+    
+  public void setBackground(Color color)
+  {
+    bg = color;
+  }
+
+  public Color getBackground()
+  {
+    return bg;
+  }
+
+  public void clip(Shape shape)
+  {
+    Shape clip = state.getClip();
+    
+    if ((shape instanceof Rectangle) && (clip instanceof Rectangle))
+      {
+	clip = ((Rectangle) clip).intersection((Rectangle) shape);
+	state.setClip(clip);
+	return;
+      }
+	
+    String msg =
+      "intersecting current clip shape " + clip + " with new shape " + shape +
+      "has not been implemented yet";
+    throw new UnsupportedOperationException(msg);
+  }
+  
+  public void drawImage(BufferedImage image, BufferedImageOp op, int x, int y)
+  {
+    throw new UnsupportedOperationException("not implemented yet");  
+  }
+
+  public void drawRenderedImage(RenderedImage image, AffineTransform xform)
+  {
+    throw new UnsupportedOperationException("not implemented yet");  
+  }
+
+  public void drawRenderableImage(RenderableImage image, AffineTransform xform)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public void drawString(AttributedCharacterIterator iterator,
+                		  int x, int y)
+  {
+    throw new UnsupportedOperationException("not implemented yet");  
+  }
+
+  public void drawString(AttributedCharacterIterator iterator, float x, 
+			 float y)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public void setComposite(Composite comp)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public void setStroke(Stroke stroke)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public void setRenderingHints(Map hints)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public void addRenderingHints(Map hints)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public Composite getComposite()
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public Stroke getStroke()
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public FontRenderContext getFontRenderContext ()
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public void drawGlyphVector (GlyphVector g, float x, float y)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/IntegerGraphicsState.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/IntegerGraphicsState.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/IntegerGraphicsState.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/IntegerGraphicsState.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,427 @@
+/* Copyright (C) 2000, 2003  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.j2d;
+
+import java.awt.Color;
+import java.awt.Image;
+import java.awt.Shape;
+import java.awt.Rectangle;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.image.BufferedImage;
+import java.awt.image.ImageObserver;
+import java.awt.image.Raster;
+import java.awt.image.WritableRaster;
+import java.awt.image.ColorModel;
+
+/**
+ * IntegerGraphicsState is one of several graphics state
+ * implementations.  This graphics state is used when the graphics
+ * object has simple properties, (coordinate translation only, no
+ * transform) and the backend supports integer coordinates (pixel
+ * based). For primitive paint operations, this object translates the
+ * coordinates and forwards the request to the backend. For requests
+ * to draw arbitrary shapes and paths, this object translates the
+ * requests to primitive drawing operations supported by the
+ * backend. IntegerGraphicsState is meant to support the most common
+ * state of an graphics object. The degree of functionality is roughly
+ * equivalent with the old java.awt.Graphics API.
+ */
+public class IntegerGraphicsState extends AbstractGraphicsState
+{
+  int tx;
+  int ty;
+  
+  DirectRasterGraphics directGfx;
+  Shape clip;
+  
+  /** Interface for images which are coupled to a GraphicsConfiguration,
+   * as is typically the case for an off-screen buffer used in
+   * double-buffering.  Any image which implements this interface is
+   * rendered directly by DirectRasterGraphics (i.e. by directGfx.drawImage)
+   */
+  public interface ScreenCoupledImage
+  {
+    /** Get the GraphicsConfiguration to which this image is coupled
+     * @return the GraphicsConfiguration
+     */
+    GraphicsConfiguration getGraphicsConfiguration ();
+  }
+  
+  public IntegerGraphicsState(DirectRasterGraphics directGfx)
+  {
+    this.directGfx = directGfx;
+  }
+  
+  public Object clone()
+  {
+    IntegerGraphicsState clone = (IntegerGraphicsState) super.clone();
+    clone.directGfx = (DirectRasterGraphics) directGfx.clone();
+    
+    return clone;
+  }
+
+  public void dispose()
+  {
+    DirectRasterGraphics lDeviceGfx = directGfx;
+    
+    directGfx = null;
+    
+    if (lDeviceGfx != null)
+      lDeviceGfx.dispose();
+    
+    super.dispose();
+  }
+  
+  // -------- Graphics methods:
+  
+  public void setColor(Color color)
+  {
+    directGfx.setColor(color);
+  }
+  
+  public void setPaintMode()
+  {
+    directGfx.setPaintMode();
+  }
+
+  public void setXORMode(Color altColor)
+  {
+    directGfx.setXORMode(altColor);
+  }
+  
+  public void setFont(Font font)
+  {
+    directGfx.setFont(font);
+  }
+  
+  public FontMetrics getFontMetrics(Font font)
+  {
+    return directGfx.getFontMetrics(font);
+  }
+
+  public void setClip(Shape clip)
+  {
+    if (clip instanceof Rectangle)
+      {
+	Rectangle clipRect = (Rectangle) ((Rectangle) clip).clone();
+	clipRect.x += tx;
+	clipRect.y += ty;
+	
+	this.clip = clipRect;
+	
+	directGfx.setClip(clipRect);
+	return;
+      }
+    
+    String msg =
+      "translating clip shape " + clip + " into device " +
+      "coordinate space has not been implemented yet";
+    
+    throw new UnsupportedOperationException(msg);
+  }
+
+  public Shape getClip()
+  {
+    if (clip == null)
+      return null;
+    if (clip instanceof Rectangle)
+      {
+	Rectangle clipRect = (Rectangle) ((Rectangle) clip).clone();
+	clipRect.x -= tx;
+	clipRect.y -= ty;
+	return clipRect;
+      }
+
+    String msg =
+      "translating clip shape " + clip + " into user " +
+      "coordinate space has not been implemented yet";
+    
+    throw new UnsupportedOperationException(msg);
+  }
+
+  public Rectangle getClipBounds()
+  {
+    if (clip == null)
+      return null;
+    Rectangle clipRect = clip.getBounds();
+    
+    clipRect.x -= tx;
+    clipRect.y -= ty;
+    return clipRect;
+  }
+
+  public void copyArea(int x, int y, 
+		       int width, int height,
+		       int dx, int dy)
+  {
+    directGfx.copyArea(x+tx, y+ty, width, height, dx, dy);
+  }
+
+  public void drawLine(int x1, int y1,
+		       int x2, int y2)
+  {
+    directGfx.drawLine(x1+tx, y1+ty, x2+tx, y2+ty);
+  }
+    
+  public void fillRect(int x, int y,
+		       int width, int height)
+  {
+    directGfx.fillRect(x+tx, y+ty, width, height);
+  }
+    
+  public void clearRect(int x, int y,
+			int width, int height)
+  {
+    directGfx.setColor(frontend.getBackground());
+    directGfx.fillRect(x+tx, y+ty, width, height);
+    directGfx.setColor(frontend.getColor());
+  }
+
+  public void drawRoundRect(int x, int y,
+			    int width, int height,
+			    int arcWidth, int arcHeight)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+  
+  public void fillRoundRect(int x, int y,
+			    int width, int height,
+			    int arcWidth, int arcHeight)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public void drawOval(int x, int y,
+		       int width, int height)
+  {
+    drawArc (x, y, width, height, 0, 360);
+  }
+  
+  public void fillOval(int x, int y,
+		       int width, int height)
+  {
+    fillArc (x, y, width, height, 0, 360);
+  }
+
+  public void drawArc(int x, int y,
+		      int width, int height,
+		      int startAngle, int arcAngle)
+  {
+    directGfx.drawArc(x+tx, y+ty, width, height, startAngle, arcAngle);
+  }    
+
+  public void fillArc(int x, int y,
+		      int width, int height,
+		      int startAngle, int arcAngle)
+  {
+    directGfx.fillArc(x+tx, y+ty, width, height, startAngle, arcAngle);
+  }
+  
+  public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
+  {
+    if ((tx == 0) && (ty == 0))
+      {
+	directGfx.drawPolyline(xPoints, yPoints, nPoints);
+	return;
+      }
+	    
+    throw new UnsupportedOperationException("translate not implemented");
+  }
+
+  public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
+  {
+    if ((tx == 0) && (ty == 0))
+      {
+	directGfx.drawPolygon(xPoints, yPoints, nPoints);
+	return;
+      }
+
+    throw new UnsupportedOperationException("translate not implemented");
+  }
+  
+  public void fillPolygon (int[] xPoints, int[] yPoints, int nPoints)
+  {
+    // FIXME: remove tx & ty args once translation via AffineTransform
+    // is implemented.
+    directGfx.fillPolygon (xPoints, yPoints, nPoints, tx, ty);
+  }
+
+  public boolean drawImage(Image image, int x, int y,
+			   ImageObserver observer)
+  {
+    x += tx;
+    y += ty;
+    
+    if (image instanceof ScreenCoupledImage)
+    {
+      GraphicsConfiguration config
+        = ((ScreenCoupledImage)image).getGraphicsConfiguration ();
+      if (config == frontend.config)
+        return directGfx.drawImage (image, x, y, observer);
+    }
+    if (image instanceof BufferedImage)
+    {
+      BufferedImage bImage = (BufferedImage) image;
+      // FIXME: eliminate? ScreenCoupledImage is probably more efficient
+      Object config = bImage.getProperty ("java.awt.GraphicsConfiguration");
+      if (config == frontend.config)
+        return directGfx.drawImage (image, x, y, observer);
+      
+      int width = image.getWidth (null);
+      int height = image.getHeight (null);
+      
+      Rectangle bounds = new Rectangle (x, y, width, height);
+      
+      MappedRaster mr = directGfx.mapRaster (bounds);
+      
+      // manipulate raster here...
+      ColorModel colorModel = mr.getColorModel ();
+      WritableRaster raster = mr.getRaster ();
+      
+      int xEnd = x + width;
+      int yEnd = y + height;
+      
+      // FIXME: Use the following code only as a fallback. It's SLOW!
+      
+      Object rgbElem = null;
+      for (int yy=0; yy<height; yy++)
+      {
+        for (int xx=0; xx<width; xx++)
+        {
+          int srgb = bImage.getRGB (xx, yy);
+          int sa = ((srgb >>> 24) & 0xff) + 1;
+          int sr = ((srgb >>> 16) & 0xff) + 1;
+          int sg = ((srgb >>> 8) & 0xff) + 1;
+          int sb = (srgb & 0xff) + 1;
+          
+          rgbElem = raster.getDataElements (xx+x, yy+y, rgbElem);
+          int drgb = colorModel.getRGB (rgbElem);
+          int dr = ((drgb >>> 16) & 0xff) + 1;
+          int dg = ((drgb >>> 8) & 0xff) + 1;
+          int db = (drgb & 0xff) + 1;
+          int da = 256 - sa;
+          
+          dr = ((sr*sa + dr*da) >>> 8) - 1;
+          dg = ((sg*sa + dg*da) >>> 8) - 1;
+          db = ((sb*sa + db*da) >>> 8) - 1;
+          
+          drgb = (dr<<16) | (dg<<8) | db;
+          
+          rgbElem = colorModel.getDataElements (drgb, rgbElem);
+          
+          raster.setDataElements (xx+x, yy+y, rgbElem);
+        }
+      }
+      directGfx.unmapRaster (mr);
+      return true;
+      
+    }
+    throw new UnsupportedOperationException ("drawing image " + image +
+    "not implemented");
+  }
+  
+
+  // -------- Graphics2D methods:
+  
+  public void draw(Shape shape)
+  {
+    if (shape instanceof Rectangle)
+      {
+	Rectangle rect = (Rectangle) shape;
+	directGfx.drawRect(rect.x+tx, rect.y+ty, rect.width, rect.height);
+	return;
+      } 
+    
+    throw new UnsupportedOperationException("shape not implemented");
+  }
+
+  public void fill(Shape shape)
+  {
+    if (shape instanceof Rectangle)
+      {
+	Rectangle rect = (Rectangle) shape;
+	directGfx.fillRect(rect.x+tx, rect.y+ty, rect.width, rect.height);
+	return;
+      }
+    
+    throw new UnsupportedOperationException("not implemented");
+  }
+    
+  public boolean hit(Rectangle rect, Shape text,
+		     boolean onStroke)
+  {
+    throw new UnsupportedOperationException("not implemented");
+  }
+
+  public void drawString(String text, int x, int y)
+  {
+    directGfx.drawString(text, x+tx, y+ty);
+  }
+
+  public void drawString(String text, float x, float y)
+  {
+    drawString(text, (int) x, (int) y);
+  }
+  
+  public void translate(int x, int y)
+  {
+    tx += x;
+    ty += y;
+  }
+    
+  public void translate(double tx, double ty)
+  {
+    if ((tx == 0) && (ty == 0))
+      return;
+    
+    needAffineTransform();
+  }
+
+  public void rotate(double theta)
+  {
+    if (theta == 0)
+      return;
+    
+    needAffineTransform();
+  }
+
+  public void rotate(double theta, double x, double y)
+  {
+    if (theta == 0)
+      return;
+    
+    needAffineTransform();
+  }
+
+  public void scale(double scaleX, double scaleY)
+  {
+    if ((scaleX == 1) && (scaleY == 1))
+      return;
+
+    needAffineTransform();
+  }
+  
+  public void shear(double shearX, double shearY)
+  {
+    if ((shearX == 0) && (shearY == 0))
+      return;
+    
+    needAffineTransform();
+  }   
+  
+  private void needAffineTransform()
+  {
+    throw new UnsupportedOperationException("state with affine " +
+					    "transform not implemented");
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/MappedRaster.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/MappedRaster.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/MappedRaster.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/j2d/MappedRaster.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,72 @@
+/* Copyright (C) 2000  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.j2d;
+
+import java.awt.image.WritableRaster;
+import java.awt.image.ColorModel;
+
+/* The raster and associated properties of a mapped screen region.
+ * The compositing capabilities of backends are often insufficient.
+ * The backend may not support alpha blending, or may not support some
+ * other special compositing rule.  This means that compositing must
+ * sometimes be done within the rendering pipeline.  The general
+ * compositing operation consists of combining new color and alpha
+ * values with existing color values on the drawing surface, to find
+ * the new color values for the drawing surface. The way the values
+ * are combined, determines what kind of compositing operation that is
+ * performed.  The default compositing operation is alpha compositing.
+ *
+ * <p>In order to perform alpha compositing and other compositing
+ * operations, we need access to the color values of the imagery that
+ * has already been drawn on the drawing surface.  The
+ * DirectRasterGraphics interface must therefore contain methods that
+ * makes it possible to gain access to the pixel values of the drawing
+ * surface.  The methods are modeled after the POSIX mmap() and
+ * munmap() functions.  But, instead of mapping and unmapping portions
+ * of data from a file descriptor to memory, the methods in
+ * DirectRasterGraphics maps and unmaps portions of the drawing
+ * surface to data arrays within writable raster objects.  A call to
+ * mapRaster() will return a writable raster object, encapsulating the
+ * image data of the drawing surface in the requested domain. The data
+ * encapsulated by this raster object can be modified using the
+ * WritableRaster API, or the data buffers can be retrieved from the
+ * raster, so that the data arrays can be manipulated directly.  When
+ * the raster image has been modified as desired, the data can be
+ * resynchronized with the drawing surface by calling mapRaster().
+ *
+ * <p>As with mmap() and munmap() the methods may work by direct
+ * manipulation of shared memory, (i.e. the raster object directly
+ * wraps the actual image data of the drawing surface), or may make a
+ * private copy that is resynched when the raster is unmapped. The
+ * backend may choose to implement either mechanism, and the pipeline
+ * code should not care what mechanism is actually used.  This design
+ * allows us to make full use of speedups such as X shared memory
+ * extentions when available.
+ */
+public class MappedRaster
+{
+  WritableRaster raster;
+  ColorModel cm;
+  
+  public MappedRaster(WritableRaster raster, ColorModel cm)
+  {
+    this.raster = raster;
+    this.cm = cm;
+  }
+
+  public final WritableRaster getRaster()
+  {
+    return raster;
+  }
+
+  public final ColorModel getColorModel()
+  {
+    return cm;
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XCanvasPeer.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XCanvasPeer.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XCanvasPeer.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XCanvasPeer.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,591 @@
+/* Copyright (C) 2000, 2002, 2003  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.xlib;
+
+import java.awt.Dimension;
+import java.awt.BufferCapabilities;
+import java.awt.Component;
+import java.awt.EventQueue;
+import java.awt.Rectangle;
+import java.awt.Color;
+import java.awt.Container;
+import java.awt.Image;
+import java.awt.GraphicsConfiguration;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Point;
+import java.awt.Toolkit;
+import java.awt.AWTEvent;
+import java.awt.Cursor;
+import java.awt.Shape;
+
+import java.awt.peer.*;
+import java.awt.image.*;
+
+import java.awt.event.MouseListener;
+import java.awt.event.PaintEvent;
+
+import java.util.EventListener;
+
+import gnu.gcj.xlib.WMSizeHints;
+import gnu.gcj.xlib.Window;
+import gnu.gcj.xlib.WindowAttributes;
+import gnu.gcj.xlib.Display;
+import gnu.gcj.xlib.Visual;
+import gnu.gcj.xlib.Screen;
+import gnu.gcj.xlib.XImage;
+
+import gnu.awt.j2d.*;
+
+public class XCanvasPeer implements CanvasPeer
+{
+  static final Dimension MIN_SIZE = new Dimension(1, 1);
+  
+  public // temporary
+  
+  Window window;
+  Window parent;
+
+  Component component;
+  XGraphicsConfiguration config;
+  private WindowAttributes attributes = new WindowAttributes();
+  private long eventMask;
+  
+  public XCanvasPeer(Component component)
+  {
+    this.component = component;
+    
+    // Set up graphics configuration (ie. screen + visual):
+
+    config = (XGraphicsConfiguration)
+      component.getGraphicsConfiguration();
+
+    if (config == null)
+      {
+	// This will usually only happen for toplevel windows
+	config = getXToolkit().getDefaultXGraphicsConfiguration();
+      } 
+
+    Rectangle bounds = component.getBounds();
+    parent = locateParentWindow(bounds);
+	
+    // Windows in X must atleast be of size 1x1
+    boolean boundsChanged = false;
+    if (bounds.width < 1)
+      {
+	boundsChanged = true;
+	bounds.width = 1;
+      }
+    if (bounds.height < 1)
+      {
+	boundsChanged = true;
+	bounds.height = 1;
+      }
+	
+    /* don't worry about this calling back to us, since the real
+       component object has not yet received a reference to this peer
+       object. */
+    component.setBounds(bounds);
+	    
+
+    /* Set background color */
+    Color bg = component.getBackground();
+    if (bg != null)
+      {
+	int[] components =
+	{
+	  bg.getRed(),
+	  bg.getGreen(),
+	  bg.getBlue(),
+	  0xff
+	};
+
+	ColorModel cm = config.getColorModel();
+	long pixel = cm.getDataElement(components, 0);
+	attributes.setBackground(pixel);
+      }
+	
+    /* Set exposure mask so that we get exposure events
+       that can be translated into paint() calls. */
+    long eventMask = WindowAttributes.MASK_EXPOSURE;
+
+    /* It would be nice to set up all other required events here, but
+       it is not possible to do so before after all the children of
+       this component has been realized.  The reason is that it is not
+       determined whether a component is lightweight before after the
+       addNotify() method has been called.  Thus, it is not possible
+       for parent component to determine what events it needs to
+       furnish for lightweight children.  Instead, we currently rely
+       on the component calling our setEventMask() method after the
+       correct event mask has been determined. */
+
+    attributes.setEventMask(eventMask);
+	
+	    
+    // TODO: set more window attributes?
+
+    /* don't allow event queue to process events from the newly
+       created window before this peer has been registered as client
+       data. */
+    synchronized (getXToolkit().eventLoop)
+      {
+	window = new gnu.gcj.xlib.Window(parent, bounds, attributes);
+	window.setClientData(this); /* make it possible to find back
+				       to this peer object. Used by
+				       XEventQueue. */
+      }
+    
+    initWindowProperties();
+
+    if (component.isVisible())
+      EventQueue.invokeLater(new DoMap(window));
+  }
+
+  /**
+   * Override this in subclasses to implement other ways of obtaining
+   * parent windows.  Toplevel windows will typically have a different
+   * implementation.
+   */
+  gnu.gcj.xlib.Window locateParentWindow(Rectangle bounds)
+  {
+    Container parent = component.getParent();
+    while (parent.isLightweight())
+      {
+	bounds.x += parent.getX();
+	bounds.y += parent.getY();
+	parent = parent.getParent();
+	// a null pointer here is a genuine error
+      }
+    
+    XCanvasPeer parentPeer = (XCanvasPeer) parent.getPeer();
+    if (parentPeer == null)
+      throw new NullPointerException("Parent has no peer. This should " +
+				     "not be possible, since the " +
+				     "calls leading here should come " +
+				     "from parent, after it has " +
+				     "set the parent peer.");
+    return parentPeer.window;
+  }
+    
+
+  /** 
+   * Template method to allow subclasses to apply properties to X11
+   * window right after creation.
+   */
+  void initWindowProperties()
+  {
+  }
+    
+  XToolkit getXToolkit()
+  {
+    return XToolkit.INSTANCE;
+  }
+
+  protected void ensureFlush()
+  {
+    getXToolkit().flushIfIdle();
+  }
+
+  public Component getComponent()
+  {
+    return component;
+  }
+  
+  long getBasicEventMask()
+  {
+    return WindowAttributes.MASK_EXPOSURE;
+  }
+    
+  // -------- java.awt.peer.ComponentPeer implementation
+
+  public int checkImage(Image img, int width, int height, ImageObserver o)
+  {
+    throw new UnsupportedOperationException("FIXME, not implemented");
+  }
+  public Image createImage(ImageProducer prod)
+  {
+    return new XOffScreenImage (config, window, prod, config.getColorModel());
+  }
+  public Image createImage(int width, int height)
+  {
+    return new XOffScreenImage (config, window, width, height, config.getColorModel());
+  }
+  public void dispose()
+  {
+    throw new UnsupportedOperationException("FIXME, not implemented");
+  }
+
+  public GraphicsConfiguration getGraphicsConfiguration()
+  {
+    return config;
+  }
+
+  public FontMetrics getFontMetrics(Font f)
+  {
+    throw new UnsupportedOperationException("FIXME, not implemented");
+  }
+
+  public ColorModel getColorModel ()
+  {
+    return null;
+  }
+
+  public Graphics getGraphics()
+  {
+    DirectRasterGraphics gfxDevice = new XGraphics(window, config);
+    IntegerGraphicsState igState = new IntegerGraphicsState(gfxDevice);
+    Graphics2DImpl gfx2d = new Graphics2DImpl(config);
+
+    gfx2d.setState(igState);
+    gfx2d.setColor(component.getBackground());
+    return gfx2d;
+  }
+
+  private Rectangle locationBounds;
+  public Point getLocationOnScreen()
+  {
+    locationBounds = window.getBounds (locationBounds);
+    return new Point (locationBounds.x,locationBounds.y);
+  }
+
+  public Dimension getMinimumSize ()
+  {
+    return MIN_SIZE;
+  }
+
+  public Dimension minimumSize ()
+  {
+    return getMinimumSize ();
+  }
+
+  public Dimension getPreferredSize ()
+  {
+    return component.getSize();
+  }
+    
+  public Dimension preferredSize ()
+  {
+    return getPreferredSize();
+  }
+    
+  public Toolkit getToolkit()
+  {
+    return getXToolkit();
+  }
+
+  public void handleEvent(AWTEvent event)
+  {
+    int id = event.getID ();
+    
+    switch (id)
+    {
+      case PaintEvent.PAINT:
+      case PaintEvent.UPDATE:
+      {
+        try
+        {
+          Graphics g = getGraphics ();
+          g.setClip (((PaintEvent)event).getUpdateRect ());
+          
+          if (id == PaintEvent.PAINT)
+            component.paint (g);
+          else
+            component.update (g);
+          
+          g.dispose ();
+        }
+        catch (InternalError e)
+        {
+          System.err.println (e);
+        }
+      }
+      break;
+    }
+  }
+
+  public boolean isFocusTraversable()
+  {
+    throw new UnsupportedOperationException("FIXME, not implemented");
+  }
+
+  public void paint(Graphics gfx)
+  {
+    // do nothing by default
+  }
+    
+  public boolean prepareImage(Image img, int width, int height,
+			      ImageObserver o)
+  {
+    throw new UnsupportedOperationException("FIXME, not implemented");
+  }
+
+  public void print(Graphics graphics)
+  {
+    paint(graphics);
+  }
+
+  public void repaint(long tm, int x, int y, int w, int h)
+  {
+    /* TODO?
+
+       X allows intelligent X servers to do smart
+       refreshing. Perhaps involve X in repainting of components,
+       rather that keeping it all within the local event queue. */
+    
+    PaintEvent updateEvent = new PaintEvent(component,
+					    PaintEvent.UPDATE,
+					    new Rectangle(x, y, w, h));
+    getXToolkit().queue.postEvent(updateEvent);
+  }
+    
+  public void requestFocus()
+  {
+    throw new UnsupportedOperationException("FIXME, not implemented");
+  }
+
+  public void setBackground(Color color)
+  {
+    if (color != null)
+    {
+      int[] components =
+      {
+        color.getRed (),
+        color.getGreen (),
+        color.getBlue (),
+        0xff
+      };
+      
+      ColorModel cm = config.getColorModel ();
+      long pixel = cm.getDataElement (components, 0);
+      attributes.setBackground (pixel);
+      window.setAttributes (attributes);
+    }
+  }
+
+  public void setBounds(int x, int y, int width, int height)
+  {
+    width  = Math.max(width,  1);
+    height = Math.max(height, 1);
+    window.setBounds(x, y, width, height);
+    ensureFlush();	    
+  }
+    
+  public void reshape (int x, int y, int width, int height)
+  {
+    setBounds (x, y, width, height);
+  }
+
+  public void setCursor(Cursor cursor)
+  {
+    throw new UnsupportedOperationException("FIXME, not implemented");
+  }
+
+  public void setEnabled(boolean enabled)
+  {
+    throw new UnsupportedOperationException("FIXME, not implemented");
+  }
+
+  public void enable ()
+  {
+    setEnabled (true);
+  }
+
+  public void disable ()
+  {
+    setEnabled (false);
+  }
+
+  public void setEventMask(long eventMask)
+  {
+    if (this.eventMask != eventMask)
+    {
+      this.eventMask = eventMask;
+      long xEventMask = getBasicEventMask ();
+      
+      if ((eventMask & AWTEvent.MOUSE_EVENT_MASK) != 0)
+      {
+        xEventMask |=
+          WindowAttributes.MASK_BUTTON_PRESS |
+          WindowAttributes.MASK_BUTTON_RELEASE;
+      }
+      
+      attributes.setEventMask (xEventMask);
+      window.setAttributes (attributes);
+      ensureFlush ();
+    }
+  }
+
+  public void setFont(Font font)
+  {
+    /* default canvas peer does not keep track of font, since it won't
+       paint anything. */
+  }
+
+  public void setForeground(Color color)
+  {
+    /* default canvas peer does not keep track of foreground, since it won't
+       paint anything. */
+  }
+	
+  public void setVisible(boolean visible)
+  {
+    if (visible)
+      {
+	window.map();
+	ensureFlush();	    
+      }
+    else
+      {
+	window.unmap();
+	ensureFlush();	    
+      }
+  }
+	
+  public void show ()
+  {
+    setVisible (true);
+  }
+
+  public void hide ()
+  {
+    setVisible (false);
+  }
+
+  public boolean isFocusable ()
+  {
+    return false;
+  }
+
+  public boolean requestFocus (Component source, boolean b1, 
+                               boolean b2, long x)
+  {
+    return false;
+  }
+
+  public boolean isObscured ()
+  {
+    return false;
+  }
+
+  public boolean canDetermineObscurity ()
+  {
+    return false;
+  }
+
+  public void coalescePaintEvent (PaintEvent e)
+  {
+  }
+
+  public void updateCursorImmediately ()
+  {
+  }
+
+  public VolatileImage createVolatileImage (int width, int height)
+  {
+    return null;
+  }
+
+  public boolean handlesWheelScrolling ()
+  {
+    return false;
+  }
+
+  public void createBuffers (int x, BufferCapabilities capabilities)
+    throws java.awt.AWTException
+
+  {
+  }
+
+  public Image getBackBuffer ()
+  {
+    return null;
+  }
+
+  public void flip (BufferCapabilities.FlipContents contents)
+  {
+  }
+
+  public void destroyBuffers ()
+  {
+  }
+
+  static class DoMap implements Runnable 
+  {
+    Window window;
+    public DoMap(Window w) 
+    {
+      this.window = w;
+    }
+    
+    public void run() 
+    {
+      window.map();
+    }
+  }
+
+  /**
+   * @since 1.5
+   */
+  public boolean isRestackSupported ()
+  {
+    return false;
+  }
+
+  /**
+   * @since 1.5
+   */
+  public void cancelPendingPaint (int x, int y, int width, int height)
+  {
+  }
+
+  /**
+   * @since 1.5
+   */
+  public void restack ()
+  {
+  }
+
+  /**
+   * @since 1.5
+   */
+  public Rectangle getBounds ()
+  {
+    return null;
+  }
+
+  /**
+   * @since 1.5
+   */
+  public void reparent (ContainerPeer parent)
+  {
+  }
+
+  /**
+   * @since 1.5
+   */
+  public void setBounds (int x, int y, int width, int height, int z)
+  {
+  }
+
+  /**
+   * @since 1.5
+   */
+  public boolean isReparentSupported ()
+  {
+    return false;
+  }
+
+  /**
+   * @since 1.5
+   */
+  public void layout ()
+  {
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XEventLoop.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XEventLoop.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XEventLoop.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XEventLoop.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,274 @@
+package gnu.awt.xlib;
+
+/* Copyright (C) 2000  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+import java.awt.*;
+
+import gnu.awt.LightweightRedirector;
+import gnu.gcj.xlib.Display;
+import gnu.gcj.xlib.XAnyEvent;
+import gnu.gcj.xlib.XExposeEvent;
+import gnu.gcj.xlib.XButtonEvent;
+import gnu.gcj.xlib.XConfigureEvent;
+import java.awt.event.PaintEvent;
+import java.awt.event.InputEvent;
+import java.awt.event.MouseEvent;
+import java.util.Vector;
+
+public class XEventLoop implements Runnable
+{
+  Display display;
+  EventQueue queue;
+  XAnyEvent anyEvent;
+  private Thread eventLoopThread;
+  
+  LightweightRedirector lightweightRedirector = new LightweightRedirector();
+    
+  public XEventLoop(Display display, EventQueue queue)
+  {
+    this.display = display;
+    this.queue = queue;
+    
+    anyEvent = new XAnyEvent(display);
+    eventLoopThread = new Thread(this, "AWT thread for XEventLoop");
+    eventLoopThread.start();
+  }
+
+  public void run ()
+  {
+    // FIXME: do we need an interrupt mechanism for window shutdown?
+    while (true)
+      postNextEvent (true);
+  }
+  
+  /** If there's an event available, post it.
+   * @return true if an event was posted
+   */
+  boolean postNextEvent(boolean block)
+  {
+    AWTEvent evt = getNextEvent(block);
+    if (evt != null)
+      queue.postEvent(evt);
+    return evt != null;
+  }
+    
+  /** Get the next event.
+   * @param block If true, block until an event becomes available
+   */
+  public AWTEvent getNextEvent(boolean block)
+  {
+    // ASSERT:
+    if (isIdle())
+      throw new Error("should not be idle");
+    
+    AWTEvent event = null;
+    if (loadNextEvent(block))
+      {
+        event = createEvent(); 
+        event = lightweightRedirector.redirect(event);
+      }
+    return event;
+  }
+
+  boolean loadNextEvent(boolean block)
+  {
+    boolean gotEvent = false;
+    try
+      {
+	setIdle(true);
+	
+	/* The code below will result in an XFlush(). However,
+	   while we are waiting for events after calling XFlush(),
+	   new X requests issued on other threads will not
+	   automatically be flushed. This can lead to a deadlock
+	   since XFlush() will not be called before after the
+	   processing of the next event, and new events arriving
+	   might be dependent on the delivery of the X
+	   requests. 
+	   
+	   Code that issues X requests should therefore call
+	   flushIfIdle() after they're done, to ensure that the
+	   requests are delivered in a timely manner.  XFlush is not
+	   run if event processing is underway, since we are assured
+	   that the event loop execution will return to this point,
+	   where requests are flushed again, before waiting for new
+	   events.
+
+	   Alternatively, do the work on the AWT thread, since the
+	   XEventQueue knows how to flush the display when it runs out
+	   of events. */
+	
+	//display.flush(); // implicit?
+	gotEvent = anyEvent.loadNext(block);
+      }
+    catch (RuntimeException re)
+      {
+	System.err.println("Exception thrown on event thread:" + re);
+      }
+    finally
+      {
+	setIdle(false);
+      }
+    return gotEvent;
+  }
+    
+  /**
+   * @returns an AWT event created based on the current XEvent.
+   * Returns null if the current XEvent does not map to any perticular
+   * AWT event.
+   */
+    
+  AWTEvent createEvent ()
+  {
+    int type = anyEvent.getType ();
+    // Ignore some events without further processing
+    switch (type)
+    {
+      // ignore "no expose" events, which are generated whenever a  pixmap
+      // is copied to copied to a window which is entirely unobscured
+      case XAnyEvent.TYPE_NO_EXPOSE:
+      case XAnyEvent.TYPE_UNMAP_NOTIFY:     // ignore for now
+      case XAnyEvent.TYPE_MAP_NOTIFY:       // ignore for now
+      case XAnyEvent.TYPE_REPARENT_NOTIFY:  // ignore for now
+        return null;
+      default:
+        break;  // continue processing events not in ignore list
+    }
+    /* avoid attempting to get client data before client data has
+       been set. */
+    Object peer;
+    synchronized (this)
+    {
+      peer = anyEvent.getWindow ().getClientData ();
+    }
+    
+    Component source = null;
+    
+    // Try to identify source component
+    
+    if (peer instanceof XCanvasPeer)
+    {
+      source = ((XCanvasPeer) peer).getComponent ();
+    }
+    
+    if (source == null)
+    {
+      String msg = "unable to locate source for event (" +
+      anyEvent + "): peer=" + peer;
+      throw new RuntimeException (msg);
+    }
+    
+    /* if a mapping from anyEvent to AWTEvent is possible, construct a
+       new AWTEvent and return it. */
+    
+    switch (type)
+    {
+      case XAnyEvent.TYPE_EXPOSE:
+        return createPaintEvent (source);
+      case XAnyEvent.TYPE_BUTTON_PRESS:
+      case XAnyEvent.TYPE_BUTTON_RELEASE:
+        return createMouseEvent (type, source);
+      case XAnyEvent.TYPE_CONFIGURE_NOTIFY:
+        configureNotify (peer);
+        return null;
+        
+      default:
+        String msg = "Do not know how to handle event (" + anyEvent + ")";
+        throw new RuntimeException (msg);
+    }
+  }
+  
+  AWTEvent createPaintEvent(Component src)
+  {
+    XExposeEvent expose = new XExposeEvent(anyEvent);
+    PaintEvent pe = new PaintEvent(src, PaintEvent.PAINT,
+				   expose.getBounds());
+    return pe;
+  }
+    
+  AWTEvent createMouseEvent(int type, Component src)
+  {    
+    XButtonEvent buttonEvt = new XButtonEvent(anyEvent);
+    
+    int modifiers = 0; //buttonToModifierMap[buttonEvt.button];
+    
+    /* Warning: this makes assumptions on the contents of
+       X.h... Button1 = 1, Button2 = 2, etc... */
+    switch (buttonEvt.button)
+      {
+      case 1:
+	modifiers = InputEvent.BUTTON1_DOWN_MASK;
+	break;
+      case 2:
+	modifiers = InputEvent.BUTTON2_DOWN_MASK;
+	break;
+      case 3:
+	modifiers = InputEvent.BUTTON2_DOWN_MASK;
+	break;
+      }
+    
+    int state = buttonEvt.state;
+    
+    // remap bits from state to modifiers:
+    
+    if ((state & XButtonEvent.MASK_SHIFT) != 0)
+      modifiers |= InputEvent.SHIFT_MASK;
+	
+	
+    if ((state & XButtonEvent.MASK_CONTROL) != 0)
+      modifiers |= InputEvent.CTRL_MASK;
+	
+    
+    /* FIXME: we need additional X code to properly map MODn states to
+       input modifiers */
+	
+    int clickCount = 1; // FIXME... Can't get this from X.
+    boolean popupTrigger = false; // FIXME: look up policy somewhere
+	
+    int x = buttonEvt.x;
+    int y = buttonEvt.y;
+
+    int id = (type == XAnyEvent.TYPE_BUTTON_PRESS) ?
+      MouseEvent.MOUSE_PRESSED :
+      MouseEvent.MOUSE_RELEASED;
+	
+    MouseEvent me = new MouseEvent(src,
+				   id,
+				   buttonEvt.time, modifiers,
+				   buttonEvt.x, buttonEvt.y,
+				   clickCount, popupTrigger);
+    return me;
+  }
+
+  void configureNotify(Object peerObj)
+  {
+    XConfigureEvent configEvent = new XConfigureEvent(anyEvent);
+    XFramePeer peer = (XFramePeer)  peerObj;
+    
+    peer.configureNotify(configEvent);
+  }
+    
+  public void flushIfIdle()
+  {
+    if (isIdle())
+      display.flush();
+  }
+  
+  volatile boolean idle = false;
+
+  final synchronized void setIdle(boolean idle)
+  {
+    this.idle = idle;
+  }
+
+  final synchronized boolean isIdle()
+  {
+    return idle;
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XEventQueue.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XEventQueue.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XEventQueue.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XEventQueue.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,99 @@
+/* Copyright (C) 2000  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.xlib;
+
+import gnu.gcj.xlib.Display;
+import java.awt.AWTEvent;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.EventQueue;
+import java.awt.event.ComponentEvent;
+import java.awt.event.ContainerEvent;
+
+/**
+ * The main difference here from a standard EventQueue is that the X
+ * display connection is flushed before waiting for more events.
+ */
+public class XEventQueue extends EventQueue
+{
+  Display display;
+  
+  public XEventQueue(Display display)
+  {
+    this.display = display;
+  }
+  
+  public AWTEvent getNextEvent() throws InterruptedException
+  {
+    if ((peekEvent() == null) && (display != null))
+      display.flush();
+    AWTEvent event = super.getNextEvent();
+    if (event != null)
+    {
+      switch (event.getID ())
+      {
+        case ContainerEvent.COMPONENT_ADDED:
+        {
+          /* If a component has been added to a container, it needs to be
+           * invalidated, to ensure that it ultimately gets an addNotify.
+           * If it's not invalidated, the component will never display in 
+           * an already-showing container (probably applies only to CardLayout).
+           * Perhaps this code should be in java.awt, but the problem only seems 
+           * to happen with xlib peers (not with gtk peers) so it's here instead.
+           */
+          ContainerEvent ce = (ContainerEvent)event;
+          ce.getChild ().invalidate ();
+          ce.getContainer ().validate ();
+        }
+        break;
+
+        case ComponentEvent.COMPONENT_RESIZED:
+        {
+          ComponentEvent ce = (ComponentEvent)event;
+          // FIXME: there may be opportunities to coalesce resize events
+          ce.getComponent ().validate ();
+        }
+        break;
+
+        case ComponentEvent.COMPONENT_SHOWN:
+        {
+          ComponentEvent ce = (ComponentEvent)event;
+          Component comp = ce.getComponent ();
+          if (!comp.isValid ())
+          {
+            /* Try to validate, going up the tree to the highest-level invalid
+             * Container.  The idea is to ensure that addNotify gets called for
+             * any non-top-level component being shown, to make it create a peer.
+             */
+            Container parent = comp.getParent ();
+            while (parent != null)
+            {
+              Container next = parent.getParent ();
+              if (next == null || next.isValid ())
+              {
+                parent.validate ();
+                break;
+              }
+              else
+                parent = next;
+            }
+            if (comp instanceof Container)
+              comp.validate ();
+          }
+          comp.repaint ();
+        }
+        break;
+        
+        default:
+          break;
+      }
+    }
+    return event;
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XFontMetrics.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XFontMetrics.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XFontMetrics.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XFontMetrics.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,47 @@
+/* Copyright (C) 2000  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.xlib;
+
+import java.awt.FontMetrics;
+
+public class XFontMetrics extends FontMetrics
+{
+  gnu.gcj.xlib.Font xfont;
+  
+  public XFontMetrics(gnu.gcj.xlib.Font xfont, java.awt.Font awtFont)
+  {
+    super(awtFont);
+    this.xfont = xfont;
+  }
+
+  public int getAscent()
+  {
+    return xfont.getAscent();
+  }
+
+  public int getDescent()
+  {
+    return xfont.getDescent();
+  }
+
+  public int getMaxAscent()
+  {
+    return xfont.getMaxAscent();
+  }
+ 
+  public int getMaxDescent()
+  {
+    return xfont.getMaxDescent();
+  }
+
+  public int stringWidth(String str)
+  {
+    return xfont.getStringWidth(str);
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XFontPeer.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XFontPeer.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XFontPeer.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XFontPeer.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,277 @@
+/* Copyright (C) 2000, 2002, 2003  Free Software Foundation
+ 
+   This file is part of libgcj.
+ 
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.xlib;
+
+import java.awt.*;
+import gnu.java.awt.ClasspathToolkit;
+import gnu.java.awt.peer.ClasspathFontPeer;
+import java.util.Locale;
+import java.awt.font.*;
+import java.awt.geom.*;
+import java.text.CharacterIterator;
+
+/**
+ * Classpath-compatible peer for a font
+ */
+public class XFontPeer extends ClasspathFontPeer
+{
+  public XFontPeer (String name, int style)
+  {
+    this (name, style, 12 /* kludge */);
+  }
+  
+  public XFontPeer (String name, int style, float size)
+  {
+    super (name, style, (int)size);
+  }
+  
+  /**
+   * Implementation of {@link Font#canDisplay(char)}
+   *
+   * @param font the font this peer is being called from. This may be
+   * useful if you are sharing peers between Font objects. Otherwise it may
+   * be ignored.
+   */
+  public boolean canDisplay (Font font, char c)
+  {
+    throw new UnsupportedOperationException ();
+  }
+  
+  /**
+   * Implementation of {@link Font#canDisplay(String)},
+   * {@link Font#canDisplay(char [], int, int)}, and
+   * {@link Font#canDisplay(CharacterIterator, int, int)}.
+   *
+   * @param font the font this peer is being called from. This may be
+   * useful if you are sharing peers between Font objects. Otherwise it may
+   * be ignored.
+   */
+  public int canDisplayUpTo (Font font, CharacterIterator i, int start, int limit)
+  {
+    throw new UnsupportedOperationException ();
+  }
+  
+  /**
+   * Implementation of {@link
+   * Font#createGlyphVector(FontRenderContext, String)}, {@link
+   * Font#createGlyphVector(FontRenderContext, char[])}, and {@link
+   * Font#createGlyphVector(FontRenderContext, CharacterIterator)}.
+   *
+   * @param font the font object that the created GlyphVector will return
+   * when it gets asked for its font. This argument is needed because the
+   * public API of {@link GlyphVector} works with {@link java.awt.Font},
+   * not with font peers.
+   */
+  public GlyphVector createGlyphVector (Font font, FontRenderContext frc, CharacterIterator ci)
+  {
+    throw new UnsupportedOperationException ();
+  }
+  
+  /**
+   * Implementation of {@link Font#createGlyphVector(FontRenderContext,
+   * int[])}.
+   *
+   * @param font the font object that the created GlyphVector will return
+   * when it gets asked for its font. This argument is needed because the
+   * public API of {@link GlyphVector} works with {@link java.awt.Font},
+   * not with font peers.
+   */
+  public GlyphVector createGlyphVector (Font font, FontRenderContext ctx, int[] glyphCodes)
+  {
+    throw new UnsupportedOperationException ();
+  }
+  
+  /**
+   * Implementation of {@link Font#getBaselineFor(char)}
+   *
+   * @param font the font this peer is being called from. This may be
+   * useful if you are sharing peers between Font objects. Otherwise it may
+   * be ignored.
+   */
+  public byte getBaselineFor (Font font, char c)
+  {
+    throw new UnsupportedOperationException ();
+  }
+  
+  /**
+   * Implementation of {@link Font#getFontMetrics()}
+   *
+   * @param font the font this peer is being called from. This may be
+   * useful if you are sharing peers between Font objects. Otherwise it may
+   * be ignored.
+   */
+  public FontMetrics getFontMetrics (Font font)
+  {
+    throw new UnsupportedOperationException ();
+  }
+  
+  /** Returns a name for the specified glyph. This is useful for
+   * generating PostScript or PDF files that embed some glyphs of a
+   * font. If the implementation follows glyph naming conventions
+   * specified by Adobe, search engines can extract the original text
+   * from the generated PostScript and PDF files.
+   *
+   * <p>This method is currently not used by GNU Classpath. However,
+   * it would be very useful for someone wishing to write a good
+   * PostScript or PDF stream provider for the
+   * <code>javax.print</code> package.
+   *
+   * <p><b>Names are not unique:</b> Under some rare circumstances,
+   * the same name can be returned for different glyphs. It is
+   * therefore recommended that printer drivers check whether the same
+   * name has already been returned for antoher glyph, and make the
+   * name unique by adding the string ".alt" followed by the glyph
+   * index.</p>
+   *
+   * <p>This situation would occur for an OpenType or TrueType font
+   * that has a <code>post</code> table of format 3 and provides a
+   * mapping from glyph IDs to Unicode sequences through a
+   * <code>Zapf</code> table. If the same sequence of Unicode
+   * codepoints leads to different glyphs (depending on contextual
+   * position, for example, or on typographic sophistication level),
+   * the same name would get synthesized for those glyphs. To avoid
+   * this, the font peer would have to go through the names of all
+   * glyphs, which would make this operation very inefficient with
+   * large fonts.
+   *
+   * @param font the font containing the glyph whose name is
+   * requested.
+   *
+   * @param glyphIndex the glyph whose name the caller wants to
+   * retrieve.
+   *
+   * @return the glyph name, or <code>null</code> if a font does not
+   * provide glyph names.
+   */
+  public String getGlyphName (Font font, int glyphIndex)
+  {
+    throw new UnsupportedOperationException ();
+  }
+  
+  /**
+   * Implementation of {@link Font#getLineMetrics(CharacterIterator, int,
+   * int, FontRenderContext)}
+   *
+   * @param font the font this peer is being called from. This may be
+   * useful if you are sharing peers between Font objects. Otherwise it may
+   * be ignored.
+   */
+  public LineMetrics getLineMetrics (Font font, CharacterIterator ci, int begin, int limit, FontRenderContext rc)
+  {
+    throw new UnsupportedOperationException ();
+  }
+  
+  /**
+   * Implementation of {@link Font#getMaxCharBounds(FontRenderContext)}
+   *
+   * @param font the font this peer is being called from. This may be
+   * useful if you are sharing peers between Font objects. Otherwise it may
+   * be ignored.
+   */
+  public Rectangle2D getMaxCharBounds (Font font, FontRenderContext rc)
+  {
+    throw new UnsupportedOperationException ();
+  }
+  
+  /**
+   * Implementation of {@link Font#getMissingGlyphCode()}
+   *
+   * @param font the font this peer is being called from. This may be
+   * useful if you are sharing peers between Font objects. Otherwise it may
+   * be ignored.
+   */
+  public int getMissingGlyphCode (Font font)
+  {
+    throw new UnsupportedOperationException ();
+  }
+  
+  /**
+   * Implementation of {@link Font#getNumGlyphs()}
+   *
+   * @param font the font this peer is being called from. This may be
+   * useful if you are sharing peers between Font objects. Otherwise it may
+   * be ignored.
+   */
+  public int getNumGlyphs (Font font)
+  {
+    throw new UnsupportedOperationException ();
+  }
+  
+  /**
+   * Implementation of {@link Font#getPSName()}
+   *
+   * @param font the font this peer is being called from. This may be
+   * useful if you are sharing peers between Font objects. Otherwise it may
+   * be ignored.
+   */
+  public String getPostScriptName (Font font)
+  {
+    throw new UnsupportedOperationException ();
+  }
+  
+  /**
+   * Implementation of {@link Font#getStringBounds(CharacterIterator, int,
+   * int, FontRenderContext)}
+   *
+   * @param font the font this peer is being called from. This may be
+   * useful if you are sharing peers between Font objects. Otherwise it may
+   * be ignored.
+   */
+  public Rectangle2D getStringBounds (Font font, CharacterIterator ci, int begin, int limit, FontRenderContext frc)
+  {
+    throw new UnsupportedOperationException ();
+  }
+  
+  /** Returns the name of this font face inside the family, for example
+   * <i>&#x201c;Light&#x201d;</i>.
+   *
+   * <p>This method is currently not used by {@link Font}. However,
+   * this name would be needed by any serious desktop publishing
+   * application.
+   *
+   * @param font the font whose sub-family name is requested.
+   *
+   * @param locale the locale for which to localize the name.  If
+   * <code>locale</code> is <code>null</code>, the returned name is
+   * localized to the user&#x2019;s default locale.
+   *
+   * @return the name of the face inside its family, or
+   * <code>null</code> if the font does not provide a sub-family name.
+   */
+  public String getSubFamilyName (Font font, Locale locale)
+  {
+    throw new UnsupportedOperationException ();
+  }
+  
+  /**
+   * Implementation of {@link Font#hasUniformLineMetrics()}
+   *
+   * @param font the font this peer is being called from. This may be
+   * useful if you are sharing peers between Font objects. Otherwise it may
+   * be ignored.
+   */
+  public boolean hasUniformLineMetrics (Font font)
+  {
+    throw new UnsupportedOperationException ();
+  }
+  
+  /**
+   * Implementation of {@link Font#layoutGlyphVector(FontRenderContext,
+   * char[], int, int, int)}.
+   *
+   * @param font the font object that the created GlyphVector will return
+   * when it gets asked for its font. This argument is needed because the
+   * public API of {@link GlyphVector} works with {@link java.awt.Font},
+   * not with font peers.
+   */
+  public GlyphVector layoutGlyphVector (Font font, FontRenderContext frc, char[] chars, int start, int limit, int flags)
+  {
+    throw new UnsupportedOperationException ();
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XFramePeer.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XFramePeer.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XFramePeer.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XFramePeer.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,215 @@
+/* Copyright (C) 2000, 2002, 2003  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.xlib;
+
+import java.awt.*;
+import java.awt.peer.*;
+import java.awt.image.*;
+import gnu.gcj.xlib.WMSizeHints;
+import gnu.gcj.xlib.WindowAttributes;
+import gnu.gcj.xlib.Display;
+import gnu.gcj.xlib.Visual;
+import gnu.gcj.xlib.Screen;
+import gnu.gcj.xlib.XConfigureEvent;
+
+/** FIXME: a lot of the code here should be moved down to XWindowPeer. */
+
+public class XFramePeer extends XCanvasPeer implements FramePeer
+{
+  private boolean processingConfigureNotify = false;
+  
+  public XFramePeer(Frame frame)
+  {
+    super(frame);
+    
+    // Set some defaults for a toplevel component:
+    if (frame.getFont() == null)
+      frame.setFont(new Font("helvetica", Font.PLAIN, 12));
+
+    if (frame.getBackground() == null)
+      frame.setBackground(Color.lightGray);
+
+    if (frame.getForeground() == null)
+      frame.setForeground(Color.black);
+  }
+
+  /** Find parent window for toplevel window, ie. root window of
+      selected screen. Bounds are not changed. */
+  gnu.gcj.xlib.Window locateParentWindow(Rectangle bounds)
+  {
+    Screen screen = config.getVisual().getScreen();
+    return screen.getRootWindow();
+  }
+	
+  void initWindowProperties()
+  {
+    Frame frame = (Frame) component;
+    setResizable(frame.isResizable());
+    String title = frame.getTitle();
+    if (!title.equals("")) setTitle(title);
+  }
+
+  long getBasicEventMask()
+  {
+    return super.getBasicEventMask() |
+      WindowAttributes.MASK_STRUCTURE_NOTIFY;
+  }
+
+  void configureNotify(XConfigureEvent configEvent)
+  {
+    processingConfigureNotify = true; // to avoid setBounds flood
+    component.setBounds(configEvent.getBounds());
+    processingConfigureNotify = false;
+  }
+
+  /* Overridden to ignore request to set bounds if the request occurs
+     while processing an XConfigureNotify event, in which case the X
+     window already has the desired bounds.
+     That's what java.awt.Window.setBoundsCallback is for, but it's
+     package-private, and using our own flag eliminates the need to
+     circumvent java security.
+  */
+  public void setBounds(int x, int y, int width, int height)
+  {
+    if (!processingConfigureNotify)
+      super.setBounds(x, y, width, height);
+  }
+  
+  // Implementing ContainerPeer:
+
+  static final Insets INSETS_0_PROTOTYPE = new Insets(0, 0, 0, 0);
+
+  public Insets getInsets()
+  {
+    return (Insets) INSETS_0_PROTOTYPE.clone();
+  }
+
+  public Insets insets ()
+  {
+    return getInsets ();
+  }
+
+  public void beginValidate()
+  {
+  }
+
+  public void endValidate()
+  {
+    // reassert sizing hints
+    Frame frame = (Frame) component;
+    setResizable(frame.isResizable());
+  }
+    
+
+  // Implementing WindowPeer:
+
+  public void toBack()
+  {
+    window.toBack ();	
+  }
+  
+  public void toFront()
+  {
+    window.toFront ();
+  }
+
+
+  // Implementing FramePeer:
+
+  public void setIconImage(Image image)
+  {
+    throw new UnsupportedOperationException("not implemented yet");	
+  }
+  
+  public void setMenuBar(MenuBar mb)
+  {
+    throw new UnsupportedOperationException("not implemented yet");	
+  }
+
+
+  public void setTitle(String title)
+  {
+    synchronized (window.getDisplay())
+      {
+	// Oh, what a nice implementation :-)
+	window.setProperty("WM_NAME", "STRING", title);
+	
+	ensureFlush();
+      }
+  }
+
+  public void setResizable(boolean resizable)
+  {
+    Frame frame = (Frame) component;
+    
+    WMSizeHints sizeHints = new WMSizeHints();
+    if (resizable)
+      {
+	Dimension minSize = frame.getMinimumSize();
+	sizeHints.setMinSize(minSize.width, minSize.height);
+	
+	Dimension maxSize = frame.getMaximumSize();
+	
+	if ((maxSize.width < Short.MAX_VALUE) ||
+	    (maxSize.height < Short.MAX_VALUE))
+	  {
+	    maxSize.width  = Math.min(maxSize.width,  Short.MAX_VALUE);
+	    maxSize.height = Math.min(maxSize.height, Short.MAX_VALUE);
+	    sizeHints.setMaxSize(maxSize.width, maxSize.height);
+	  }
+      }
+    else
+      {
+	// lock resizing to current bounds
+	Dimension size = frame.getSize();
+	sizeHints.setMinSize(size.width, size.height);
+	sizeHints.setMaxSize(size.width, size.height);
+      }
+    sizeHints.applyNormalHints(window);
+  }
+
+  public int getState ()
+  {
+    return 0;
+  }
+
+  public void setState (int state)
+  {
+  }
+
+  public void setMaximizedBounds (Rectangle r)
+  {
+  }
+
+  public void beginLayout () { }
+  public void endLayout () { }
+  public boolean isPaintPending () { return false; }
+
+  /**
+   * @since 1.5
+   */
+  public void setBoundsPrivate (int x, int y, int width, int height)
+  {
+  }
+
+  /**
+   * @since 1.5
+   */
+  public void updateAlwaysOnTop()
+  {
+  }
+
+  /**
+   * @since 1.5
+   */
+  public boolean requestWindowFocus ()
+  {
+    return false;
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphics.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphics.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphics.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphics.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,305 @@
+/* Copyright (C) 2000, 2003, 2004  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.xlib;
+
+import java.awt.*;
+import java.awt.image.WritableRaster;
+import java.awt.image.Raster;
+import java.awt.image.DataBuffer;
+import java.awt.image.ColorModel;
+import java.awt.image.ImageObserver;
+import java.awt.image.BufferedImage;
+import gnu.gcj.xlib.GC;
+import gnu.gcj.xlib.XImage;
+import gnu.gcj.xlib.Drawable;
+import gnu.gcj.xlib.Window;
+import gnu.gcj.xlib.Drawable;
+import gnu.gcj.xlib.Pixmap;
+import gnu.gcj.xlib.Visual;
+import gnu.awt.j2d.DirectRasterGraphics;
+import gnu.awt.j2d.MappedRaster;
+
+public class XGraphics implements Cloneable, DirectRasterGraphics
+{
+  static class XRaster extends MappedRaster
+  {
+    XImage ximage;
+    
+    public XRaster(WritableRaster raster, XImage ximage, ColorModel cm)
+    {
+      super(raster, cm);
+      this.ximage = ximage;
+    }
+  }
+  
+  GC context;
+  XGraphicsConfiguration config;
+  Rectangle clipBounds;
+    
+  XFontMetrics metrics;
+
+
+  public Object clone()
+  {
+    try
+      {
+	XGraphics gfxCopy = (XGraphics) super.clone();
+	gfxCopy.context = context.create();
+	
+	return gfxCopy;
+      }
+    catch (CloneNotSupportedException ex)
+      {
+	// This should never happen.
+	throw new InternalError ();
+      }
+  }
+
+  public void dispose()
+  {
+    GC lContext = context;
+    context = null;
+    config = null;
+    clipBounds = null;
+    metrics = null;
+    
+    if (lContext != null)
+    {
+      lContext.dispose();
+    }	    
+  }
+
+  public XGraphics(Drawable drawable, XGraphicsConfiguration config)
+  {
+    context = GC.create(drawable);
+    this.config = config;
+  }  
+  
+  public void setColor(Color color)
+  {
+    if (color != null)
+      context.setForeground(config.getPixel(color));
+  }
+
+  public void setPaintMode()
+  {
+    throw new UnsupportedOperationException("not implemented");
+  }
+
+  public void setXORMode(Color c1)
+  {
+    throw new UnsupportedOperationException("not implemented");
+  }
+    
+  public void setFont(Font font)
+  {
+    if (font == null)
+      return;
+    if ((metrics != null) && font.equals(metrics.getFont()))
+      return;
+    metrics = config.getXFontMetrics(font);
+    if (metrics != null)
+      context.setFont(metrics.xfont);
+  }
+    
+  public FontMetrics getFontMetrics(Font font)
+  {
+    if ((metrics != null) && font.equals(metrics.getFont()))
+      return metrics;
+    
+    return config.getXFontMetrics(font);
+  }
+    
+  public void setClip(int x, int y, int width, int height)
+  {
+    Rectangle[] rects = { new Rectangle(x, y, width, height) };
+    context.setClipRectangles(rects);
+  }
+    
+  public void setClip(Shape clip)
+  {
+    /* TODO: create a special RectangleUnion shape that can be
+       used to draw advantage of the GCs ability to set multiple
+       rectangles. 
+    */
+
+    /* FIXME: creating all these objects is wasteful and can be
+       costly in the long run, since this code is run at every
+       expose. */
+    Rectangle newClipBounds = clip.getBounds();
+    
+    /* FIXME: decide whether this test code is worth anything
+     * (as of 2004-01-29, it prints frequently)
+    if ((clipBounds != null) && !clipBounds.contains(newClipBounds))
+      {
+	System.err.println("warning: old clip ("+ clipBounds +") does " +
+			   "not fully contain new clip (" +
+			   newClipBounds + ")");
+      }
+     */
+    clipBounds = newClipBounds;
+    Rectangle[] rects = { clipBounds };
+    context.setClipRectangles(rects);
+  }
+    
+  public void copyArea(int x, int y, int width, int height, int
+		       dx, int dy)
+  {
+    throw new UnsupportedOperationException("not implemented");
+  }
+    
+  public void drawLine(int x1, int y1, int x2, int y2)
+  {
+    context.drawLine(x1, y1, x2, y2);
+  }
+    
+  public void drawRect(int x, int y, int width, int height)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+    
+  public void fillRect(int x, int y, int width, int height)
+  {
+    context.fillRectangle(x, y, width, height);
+  }
+    
+  public void drawArc(int x, int y, int width, int height, int
+		      startAngle, int arcAngle)
+  {
+    context.drawArc (x, y, width, height, startAngle, arcAngle);
+  }
+    
+  public void fillArc(int x, int y, int width, int height, int
+		      startAngle, int arcAngle)
+  {
+    context.fillArc (x, y, width, height, startAngle, arcAngle);
+  }
+    
+  public void drawPolyline(int[] xPoints, int[] yPoints, int
+			   nPoints)
+  {
+    throw new UnsupportedOperationException("not implemented");
+  }
+    
+  public void drawPolygon(int[] xPoints, int[] yPoints, int
+			  nPoints)
+  {
+    throw new UnsupportedOperationException("not implemented");
+  }
+    
+  public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints,
+			  int translateX, int translateY)
+  {
+    context.fillPolygon(xPoints, yPoints, nPoints, translateX, translateY);
+  }
+
+  public void drawString(String str, int x, int y)
+  {
+    context.drawString(str, x, y);
+  }
+
+  public boolean drawImage(Image img, int x, int y,
+			   ImageObserver observer)
+  {
+    if (img instanceof XOffScreenImage)
+    {
+      // FIXME: have to enforce clip, or is it OK as-is?
+      XOffScreenImage offScreenImage = (XOffScreenImage) img;
+      Pixmap pixmap = offScreenImage.getPixmap ();
+      context.copyArea (pixmap, 0, 0, x, y,
+        offScreenImage.getWidth (), offScreenImage.getHeight ());
+      return true;
+    }
+    if (clipBounds == null)
+      return false; // ***FIXME***
+
+    if (!(img instanceof BufferedImage))
+      {
+	throw new AWTError("unknown image class");
+      }
+	
+    BufferedImage bimg = (BufferedImage) img;
+
+    XImage ximg = (XImage) bimg.getProperty("gnu.gcj.xlib.XImage");
+    if (ximg == null)
+      {
+	System.err.println("FIXME: skipping null XImage, should " +
+			   "really do on the spot conversion");
+	return false;
+      }
+
+    /*
+      +------------------
+      |    clip
+      |     +---------+
+      | img |         |
+      |  +--+-------+ |
+      |  |  |       | | 
+      |  |  |       | |
+      |  |  +-------+-+
+      |  |          |
+      |  +----------+
+    */
+
+    int iLeft   = Math.max(x, clipBounds.x);
+    int iTop    = Math.max(y, clipBounds.y);
+    int iRight  = Math.min(x + bimg.getWidth(),
+			   clipBounds.x + clipBounds.width);
+    int iBottom = Math.min(y + bimg.getHeight(),
+			   clipBounds.y + clipBounds.height);
+    
+    int srcX = iLeft - x;
+    int srcY = iTop  - y;
+    
+    int width  = iRight  - iLeft;
+    int height = iBottom - iTop;
+    
+    if ((width > 0) && (height > 0))
+      context.putImage(ximg, srcX, srcY, iLeft, iTop, width, height);
+
+    return true;
+  }
+
+  public MappedRaster mapRaster(Rectangle bounds)
+  {
+    Visual visual = config.getVisual();
+    XImage ximage = new XImage(visual, bounds.width, bounds.height,
+			       false // do not auto allocate memory
+			       );
+
+    WritableRaster raster =
+      config.createRasterForXImage(ximage,
+				   new Point(bounds.x, bounds.y));
+    
+    DataBuffer dataB = raster.getDataBuffer();
+    XGraphicsConfiguration.attachData(ximage, dataB, 0);
+
+    Drawable drawable = context.getDrawable();
+
+    // TODO: restrict to clipping
+
+    Rectangle mBounds = drawable.copyIntoXImage(ximage, bounds, 0, 0);
+	
+    return new XRaster(raster, ximage, config.imageCM);
+  }
+    
+    
+  public void unmapRaster(MappedRaster mappedRaster)
+  {
+    XRaster xraster = (XRaster) mappedRaster;
+    XImage ximage = xraster.ximage;
+    Raster raster = xraster.getRaster();
+    int x = raster.getMinX();
+    int y = raster.getMinY();
+    int width = raster.getWidth();
+    int height = raster.getHeight();
+    
+    context.putImage(ximage, 0, 0, x, y, width, height);
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphicsConfiguration.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphicsConfiguration.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphicsConfiguration.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphicsConfiguration.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,550 @@
+/* Copyright (C) 2000, 2003  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.xlib;
+
+import java.awt.GraphicsConfiguration;
+import java.awt.Rectangle;
+import java.awt.Graphics2D;
+import java.awt.Graphics;
+import java.awt.GraphicsDevice;
+import java.awt.Point;
+import java.awt.Color;
+import java.awt.color.ColorSpace;
+import java.awt.Font;
+import java.awt.image.*;
+import java.awt.geom.AffineTransform;
+import gnu.gcj.xlib.GC;
+import gnu.gcj.xlib.Drawable;
+import gnu.gcj.xlib.Window;
+import gnu.gcj.xlib.XImage;
+import gnu.gcj.xlib.Visual;
+import gnu.gcj.xlib.Colormap;
+import gnu.gcj.xlib.XColor;
+import gnu.gcj.xlib.Screen;
+import gnu.gcj.xlib.Display;
+import gnu.gcj.xlib.XException;
+import gnu.java.awt.Buffers;
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+public class XGraphicsConfiguration extends GraphicsConfiguration
+{
+  //public abstract GraphicsDevice getDevice();
+  
+  Visual visual;
+  int format;
+  Colormap colormap;
+  ColorModel imageCM;
+  ColorModel pixelCM;
+  private static final int CACHE_SIZE_PER_DISPLAY = 10;
+  static FontMetricsCache fontMetricsCache = new FontMetricsCache ();
+  
+  /** Font metrics cache class.  Caches at most CACHE_SIZE_PER_DISPLAY
+   * XFontMetrics objects for each display device.  When a display's cache
+   * gets full, the least-recently used entry is overwritten.
+   * XXX: lruOrder rolls over after a few billion operations, so it might
+   * on very rare occasions misinterpret which is the oldest entry
+   */
+  static class FontMetricsCache
+  {
+    private java.util.Hashtable displays = new java.util.Hashtable ();
+    
+    /** Font metrics cache for a display device
+     */
+    class PerDisplayCache
+    {
+      private int lruCount = 0;
+      private java.util.Hashtable entries = new java.util.Hashtable ();
+      
+      class CacheEntry
+      {
+        int lruOrder;
+        XFontMetrics fm;
+        Font font;
+      }
+      
+      /** Get an entry (null if not there) and update LRU ordering
+       */
+      XFontMetrics get (Font font)
+      {
+        CacheEntry entry = (CacheEntry)entries.get (font);
+        if (entry != null)
+        {
+          entry.lruOrder = lruCount++;
+        }
+        return (entry==null) ? null : entry.fm;
+      }
+      
+      /** Put an entry in the cache, eliminating the oldest entry if
+       * the cache is at capacity.
+       */
+      void put (Font font, XFontMetrics fontMetrics)
+      {
+        if (entries.size () >= CACHE_SIZE_PER_DISPLAY)
+        {
+          // cache is full -- eliminate the oldest entry
+          // slow operation, but shouldn't happen very often
+          int maxAge = 0;
+          CacheEntry oldestEntry = null;
+          int referenceCount = lruCount;
+          for (Enumeration e = entries.elements (); e.hasMoreElements ();)
+          {
+            CacheEntry entry = (CacheEntry)e.nextElement ();
+            if ((referenceCount-entry.lruOrder) > maxAge)
+            {
+              maxAge = referenceCount-entry.lruOrder;
+              oldestEntry = entry;
+            }
+          }
+          if (oldestEntry != null)
+            entries.remove (oldestEntry.font);
+        }
+        CacheEntry newEntry = new CacheEntry ();
+        newEntry.lruOrder = lruCount++;
+        newEntry.fm = fontMetrics;
+        newEntry.font = font;
+        entries.put (font,newEntry);
+      }
+    }
+    
+    /** Get the font metrics for a font, if it is present in the cache.
+     * @param font The AWT font for which to find the font metrics
+     * @param display The display, to select the cached entries for that display
+     * @return The font metrics, or null if not cached
+     */
+    XFontMetrics get (Font font, Display display)
+    {
+      PerDisplayCache cache = (PerDisplayCache)displays.get (display);
+      return (cache==null) ? null : cache.get (font);
+    }
+    
+    /** Put a font in the cache
+     * @param font The font
+     * @param display The display
+     * @param fontMetrics The font metrics
+     */
+    void put (Font font, Display display, XFontMetrics fontMetrics)
+    {
+      PerDisplayCache cache = (PerDisplayCache)displays.get (display);
+      if (cache == null)
+      {
+        cache = new PerDisplayCache ();
+        displays.put (display,cache);
+      }
+      cache.put (font,fontMetrics);
+    }
+  }
+  
+  public XGraphicsConfiguration(Visual visual)
+  {
+    this.visual = visual;
+  }
+
+  public BufferedImage createCompatibleImage(int width, int height)
+  {
+    XImage ximg = new XImage(visual, width, height,
+			     false // do not auto allocate memory
+			     );
+
+    Point origin = new Point(0, 0);
+    WritableRaster raster = createRasterForXImage(ximg, origin);
+
+    /* This is not a good way of doing this. Multiple toolkits may
+       want to share the BufferedImage. */
+    Hashtable props = new Hashtable();
+    props.put("gnu.gcj.xlib.XImage", ximg);
+    props.put("java.awt.GraphicsConfiguration", this);
+    
+    BufferedImage bimg = new BufferedImage(imageCM,raster, false, props);
+
+    DataBuffer dataB = raster.getDataBuffer();
+    attachData(ximg, dataB, 0);
+    return bimg;
+  }
+
+  WritableRaster createRasterForXImage(XImage ximage, Point origin)
+  {
+    if (imageCM == null) prepareColorModel(ximage);
+    
+    /*
+      This will not work, since it creates a sample model that
+      does not necessarily match the format of the XImage.
+      
+      WritableRaster raster =
+      imageCM.createCompatibleWritableRaster(width, height); */
+    
+    // Create a sample model matching the XImage:
+
+    SampleModel imageSM = null;
+
+    int width = ximage.getWidth();
+    int height = ximage.getHeight();
+    int bitsPerPixel = ximage.getBitsPerPixel();
+    int dataType =
+      Buffers.smallestAppropriateTransferType(bitsPerPixel);
+    int bitsPerDataElement = DataBuffer.getDataTypeSize(dataType);
+    int scanlineStride = ximage.getBytesPerLine()*8/bitsPerDataElement;
+    
+    if (imageCM instanceof IndexColorModel)
+      {
+	int[] bandOffsets = {0};
+	imageSM = new ComponentSampleModel(dataType,
+					   width, height,
+					   1, // pixel stride
+					   scanlineStride,
+					   bandOffsets);
+      }
+    else if (imageCM instanceof PackedColorModel)
+      {
+	PackedColorModel pcm = (PackedColorModel) imageCM;
+	int[] masks = pcm.getMasks();
+	
+	imageSM = new SinglePixelPackedSampleModel(dataType,
+						   width, height,
+						   scanlineStride,
+						   masks);
+      }
+
+    if (imageSM == null)
+      {
+	throw new UnsupportedOperationException("creating sample model " +
+						"for " + imageCM +
+						" not implemented");
+      }
+
+    WritableRaster raster = Raster.createWritableRaster(imageSM, origin);
+    return raster;
+  }
+
+
+
+  /**
+   * Attach a the memory of a data buffer to an XImage
+   * structure. [This method is not gnu.awt.xlib specific, and should
+   * maybe be moved to a different location.]
+   *
+   * @param offset Offset to data. The given offset does not include
+   * data buffer offset, which will also be added.  
+   */
+  static void attachData(XImage ximage, DataBuffer dataB, int offset)
+  {
+    offset += dataB.getOffset();
+    switch (dataB.getDataType())
+      {
+      case DataBuffer.TYPE_BYTE:
+	ximage.setData(((DataBufferByte) dataB).getData(), offset);
+	break;
+      case DataBuffer.TYPE_USHORT:
+	ximage.setData(((DataBufferUShort) dataB).getData(), offset);
+	break;
+      case DataBuffer.TYPE_INT:
+	ximage.setData(((DataBufferInt) dataB).getData(), offset);
+	break;
+      default:
+	throw
+	  new UnsupportedOperationException("Do not know how to " +
+					    "set data for data " +
+					    "type " +
+					    dataB.getDataType());
+      }
+  }
+    
+  void prepareColorModel(XImage ximage)
+  {
+    format = ximage.getFormat();
+    int bitsPerPixel = ximage.getBitsPerPixel();
+    switch (format) {
+    case XImage.ZPIXMAP_FORMAT:
+      calcZPixmapModels(bitsPerPixel);
+      break;
+      
+    default:
+      throw new UnsupportedOperationException("unimplemented format");
+    }
+  }
+
+  void calcZPixmapModels(int bitsPerPixel)
+  {
+    switch (visual.getVisualClass())
+      {
+      case Visual.VC_TRUE_COLOR:
+	calcDecomposedRGBModels(bitsPerPixel);
+	break;
+      case Visual.VC_PSEUDO_COLOR:
+	calcPseudoColorModels(bitsPerPixel);
+	break;
+      default:
+	String msg = "unimplemented visual class";
+	throw new UnsupportedOperationException(msg);
+      }
+  }
+    
+  void calcDecomposedRGBModels(int bitsPerPixel)
+  {
+    int dataType = Buffers.smallestAppropriateTransferType(bitsPerPixel);
+    
+    
+    if (DataBuffer.getDataTypeSize(dataType) == bitsPerPixel)
+      {	
+	ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+	
+	imageCM = new DirectColorModel(cs,
+				       visual.getDepth(),
+				       visual.getRedMask(),
+				       visual.getGreenMask(),
+				       visual.getBlueMask(),
+				       0, // no alpha
+				       false,
+				       dataType);
+      }
+    else
+      {
+	throw new
+	  UnsupportedOperationException("unimplemented bits per pixel");
+      }
+    }
+    
+  void calcPseudoColorModels(int bitsPerPixel)
+  {
+    if (colormap == null)
+      colormap = visual.getScreen().getDefaultColormap();
+    
+    XColor[] colArray = colormap.getXColors();
+	
+    int numCol = colArray.length;
+    byte[] rmap = new byte[numCol];
+    byte[] gmap = new byte[numCol];
+    byte[] bmap = new byte[numCol];
+    byte[] amap = new byte[numCol];
+    
+    for (int i=0; i < numCol; i++)
+      {
+	XColor color = colArray[i];
+	if (color.getFlags() == Colormap.FLAG_SHARED)
+	  {
+	    rmap[i] = (byte) (color.getRed()   >> 8);
+	    gmap[i] = (byte) (color.getGreen() >> 8);
+	    bmap[i] = (byte) (color.getBlue()  >> 8);
+	    amap[i] = (byte) 0xff;
+	  } // else, leave default zero values...
+      }
+
+    imageCM = new IndexColorModel(visual.getDepth(), numCol,
+				  rmap, gmap, bmap, amap);
+  }
+
+  /**
+   * Gets the associated device that this configuration describes.
+   *
+   * @return the device
+   */
+  public GraphicsDevice getDevice()
+  {
+    throw new UnsupportedOperationException("not implemented");  
+  }
+
+  /**
+   * Returns a buffered image optimized to this device, so that blitting can
+   * be supported in the buffered image.
+   *
+   * @param w the width of the buffer
+   * @param h the height of the buffer
+   * @return the buffered image, or null if none is supported
+   */
+  public BufferedImage createCompatibleImage(int width,
+					     int height,
+					     int transparency)
+  {
+    throw new UnsupportedOperationException("not implemented");
+  }
+
+  /**
+   * Returns a buffered volatile image optimized to this device, so that
+   * blitting can be supported in the buffered image. Because the buffer is
+   * volatile, it can be optimized by native graphics accelerators.
+   *
+   * @param w the width of the buffer
+   * @param h the height of the buffer
+   * @return the buffered image, or null if none is supported
+   * @see Component#createVolatileImage(int, int)
+   * @since 1.4
+   */
+  public VolatileImage createCompatibleVolatileImage(int w, int h)
+  {
+    throw new UnsupportedOperationException("not implemented");
+  }
+
+  /**
+   * FIXME: I'm not sure which color model that should be returned here.
+   */
+  public ColorModel getColorModel()
+  {
+    if (pixelCM == null)
+      preparePixelCM();
+    return pixelCM;
+  }
+
+  void preparePixelCM()
+  {
+    switch (visual.getVisualClass())
+      {
+      case Visual.VC_TRUE_COLOR:
+	pixelCM = new DirectColorModel(visual.getDepth(),
+				       visual.getRedMask(),
+				       visual.getGreenMask(),
+				       visual.getBlueMask());
+	break;
+      case Visual.VC_PSEUDO_COLOR:
+
+	if (colormap == null)
+	  colormap = visual.getScreen().getDefaultColormap();
+	
+	XColor[] colArray = colormap.getXColors();
+	
+	int numCol = colArray.length;
+	byte[] rmap = new byte[numCol];
+	byte[] gmap = new byte[numCol];
+	byte[] bmap = new byte[numCol];
+	byte[] amap = new byte[numCol];
+	
+	for (int i=0; i < numCol; i++)
+	  {
+	    XColor color = colArray[i];
+	    if (color.getFlags() == Colormap.FLAG_SHARED) {
+	      rmap[i] = (byte) (color.getRed()   >> 8);
+	      gmap[i] = (byte) (color.getGreen() >> 8);
+	      bmap[i] = (byte) (color.getBlue()  >> 8);
+	      amap[i] = (byte) 0xff;
+	    } // else, leave default zero values...
+
+	  }
+
+	pixelCM = new IndexColorModel(visual.getDepth(), numCol,
+				      rmap, gmap, bmap, amap);
+	break;
+      default:
+	throw new UnsupportedOperationException("not implemented");
+      }
+  }
+  
+  public ColorModel getColorModel(int transparency)
+  {
+    throw new UnsupportedOperationException("not implemented");
+  }
+    
+  public AffineTransform getDefaultTransform()
+  {
+    throw new UnsupportedOperationException("not implemented");
+  }
+
+  public AffineTransform getNormalizingTransform()
+  {
+    throw new UnsupportedOperationException("not implemented");
+  }
+ 
+  public Rectangle getBounds()
+  {
+    throw new UnsupportedOperationException("not implemented");
+  }
+
+  Visual getVisual()
+  {
+    return visual;
+  }
+    
+  /* FIXME: This should be moved to XGraphicsDevice... */
+  XFontMetrics getXFontMetrics (java.awt.Font awtFont)
+  {
+    // If the metrics object for this font is already cached, use it.
+    // Otherwise create and cache it.
+    Display display = visual.getScreen ().getDisplay ();
+    XFontMetrics fm = fontMetricsCache.get (awtFont,display);
+    if (fm == null)
+    {
+      String foundry      = "*";
+      String family       = awtFont.getName ();
+      String weight       = awtFont.isBold () ? "bold" : "medium";
+      String slant        = awtFont.isItalic () ? "i" : "r";
+      String sWidth       = "*";
+      String addStyle     = "";
+      String pixelSize    = "*";
+      String pointSize    = awtFont.getSize () + "0";
+      String xres         = "*";
+      String yres         = "*";
+      String spacing      = "*";
+      String averageWidth = "*";
+      String charset      = "iso10646-1"; // because we use functions like XDrawString16
+      
+      String logicalFontDescription =
+        "-" + // FontNameRegistry prefix
+        foundry   + "-" + family    + "-" + weight       + "-" +
+        slant     + "-" + sWidth    + "-" + addStyle     + "-" +
+        pixelSize + "-" + pointSize + "-" + xres         + "-" +
+        yres      + "-" + spacing   + "-" + averageWidth + "-";
+      
+      // Try to load a Unicode font.  If that doesn't work, try again, without
+      // specifying the character set.
+      try
+      {
+        gnu.gcj.xlib.Font xfont = new gnu.gcj.xlib.Font (display, logicalFontDescription + charset);
+        fm = new XFontMetrics (xfont, awtFont);
+      }
+      catch (XException e)
+      {
+        gnu.gcj.xlib.Font xfont = new gnu.gcj.xlib.Font (display, logicalFontDescription + "*-*");
+        fm = new XFontMetrics (xfont, awtFont);
+      }
+      fontMetricsCache.put (awtFont,display,fm);
+    }
+    return fm;
+  }
+
+  int getPixel(Color color)
+  {
+    /* FIXME: consider an integer technique whenever
+     * the ColorModel is 8 bits per color.
+     * The problem with using integers is that it doesn't work unless
+     * the colors are 8 bits each (as in the array), since ColorModel.getDataElement(int[],int)
+     * expects non-normalized values.  For example, in a 16-bit display mode, you
+     * would typically have 5 bits each for red and blue, and 6 bits for green.
+    int[] components =
+    {
+      color.getRed (),
+      color.getGreen (),
+      color.getBlue (),
+      0xff
+    };
+     */
+    
+    int[] unnormalizedComponents = { 0, 0, 0, 0xff };
+    ColorModel cm = getColorModel ();
+    if (color != null)
+    {
+      float[] normalizedComponents =
+      {
+        ((float)color.getRed ()) / 255F,
+        ((float)color.getGreen ()) / 255F,
+        ((float)color.getBlue ()) / 255F,
+        1
+      };
+      cm.getUnnormalizedComponents(normalizedComponents, 0,
+           unnormalizedComponents, 0);
+    }
+    return cm.getDataElement (unnormalizedComponents, 0);
+  }
+
+  /**
+   * @since 1.5
+   */
+  public VolatileImage createCompatibleVolatileImage (int width, int height,
+                                                      int transparency)
+  {
+    return null;
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphicsDevice.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphicsDevice.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphicsDevice.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphicsDevice.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,58 @@
+/* Copyright (C) 2005  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.xlib;
+
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsConfiguration;
+
+public class XGraphicsDevice extends GraphicsDevice
+{
+  private int id;
+  private String IDstring;
+  private GraphicsConfiguration[] configs;
+
+  public int getType()
+  {
+    return TYPE_RASTER_SCREEN;
+  }
+
+  public XGraphicsDevice(int id, XToolkit toolkit)
+  {
+    this.id = id;
+    IDstring = "XGraphicsDevice " + id;
+    configs = new GraphicsConfiguration [1];
+    configs[0] = toolkit.getDefaultXGraphicsConfiguration();
+  }
+
+  public String getIDstring()
+  {
+    return IDstring;
+  }
+
+  public GraphicsConfiguration[] getConfigurations()
+  {
+    return configs;
+  }
+
+  public GraphicsConfiguration getDefaultConfiguration()
+  {
+    return configs[0];
+  }
+
+  public boolean isDisplayChangeSupported()
+  {
+    return false;
+  }
+
+  public boolean isFullScreenSupported()
+  {
+    return false;
+  }
+}
+

Propchange: llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphicsDevice.java

------------------------------------------------------------------------------
    svn:executable = *

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphicsEnvironment.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphicsEnvironment.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphicsEnvironment.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphicsEnvironment.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,59 @@
+/* Copyright (C) 2005  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.xlib;
+
+import java.awt.GraphicsEnvironment;
+import java.awt.GraphicsDevice;
+import java.awt.Graphics2D;
+import java.awt.Font;
+import java.awt.image.BufferedImage;
+import java.util.Locale;
+
+public class XGraphicsEnvironment extends GraphicsEnvironment
+{
+  private XToolkit toolkit;
+  private XGraphicsDevice [] devices;
+
+  XGraphicsEnvironment (XToolkit toolkit)
+  {
+    this.toolkit = toolkit;
+    devices = new XGraphicsDevice [1];
+    devices [0] = new XGraphicsDevice (0,toolkit);
+  }
+
+  public GraphicsDevice[] getScreenDevices ()
+  {
+    return devices;
+  }
+
+  public GraphicsDevice getDefaultScreenDevice ()
+  {
+    return devices [0];
+  }
+
+  public Graphics2D createGraphics (BufferedImage image)
+  {
+    throw new UnsupportedOperationException ("createGraphics not implemented yet in " + this.getClass ().getName ());
+  }
+
+  public Font[] getAllFonts()
+  {
+    throw new UnsupportedOperationException ("getAllFonts not implemented yet in " + this.getClass ().getName ());
+  }
+
+  public String[] getAvailableFontFamilyNames (Locale l)
+  {
+    throw new UnsupportedOperationException ("getAvailableFontFamilyNames not implemented yet in " + this.getClass ().getName ());
+  }
+
+  public String[] getAvailableFontFamilyNames ()
+  {
+    throw new UnsupportedOperationException ("getAvailableFontFamilyNames not implemented yet in " + this.getClass ().getName ());
+  }
+}

Propchange: llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XGraphicsEnvironment.java

------------------------------------------------------------------------------
    svn:executable = *

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XOffScreenImage.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XOffScreenImage.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XOffScreenImage.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XOffScreenImage.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,280 @@
+/* Copyright (C) 2000, 2003  Free Software Foundation
+ 
+   This file is part of libgcj.
+ 
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.xlib;
+
+import java.awt.Image;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.GraphicsConfiguration;
+import java.awt.image.ColorModel;
+import java.awt.image.ImageObserver;
+import java.awt.image.ImageProducer;
+import java.awt.image.ImageConsumer;
+import java.util.Hashtable;
+import gnu.awt.j2d.DirectRasterGraphics;
+import gnu.awt.j2d.Graphics2DImpl;
+import gnu.awt.j2d.IntegerGraphicsState;
+import gnu.gcj.xlib.Drawable;
+import gnu.gcj.xlib.Pixmap;
+import gnu.gcj.xlib.Screen;
+import gnu.gcj.xlib.Visual;
+import gnu.gcj.xlib.GC;
+
+/** Image class for xlib off-screen buffers.
+ * The image is stored in a server-side pixmap for best performance.
+ * This class supports getGraphics, so you can draw on the pixmap, and is
+ * specially handled when doing drawImage, so that the image copy is done
+ * entirely in the X server.
+ * This class does not support rasterization, for which you'd need an XImage.
+ *
+ * @author  scott gilbertson <scottg at mantatest.com> <sgilbertson at cogeco.ca>
+ */
+public class XOffScreenImage extends Image 
+                             implements IntegerGraphicsState.ScreenCoupledImage,
+                             ImageConsumer
+{
+  private Pixmap pixmap;
+  private XGraphicsConfiguration config;
+  private int width;
+  private int height;
+  private Drawable drawable;
+  private ImageProducer prod;
+  private GC gc;
+  private ColorModel pixmapColorModel;
+  
+  /** Create a new XOffScreenImage
+   * @param config Graphics configuration, to compare against on-screen 
+   *               components and to create the appropriate Graphics
+   * @param drawable The drawable with which the image is compatible
+   * @param width The width of the image
+   * @param height The height of the image
+   * @param cm The ColorModel associated with drawable
+   */
+  XOffScreenImage (XGraphicsConfiguration config, Drawable drawable, int width, int height, ColorModel cm)
+  {
+    this.config = config;
+    this.width = width;
+    this.height = height;
+    this.drawable = drawable;
+    pixmapColorModel = cm;
+    pixmap = new Pixmap (drawable, width, height, drawable.getDepth ());
+    gc = GC.create (pixmap);
+  }
+  
+  /** Create a new XOffScreenImage and obtain image data from an ImageProducer
+   * @param config Graphics configuration, to compare against on-screen 
+   *               components and to create the appropriate Graphics
+   * @param drawable The drawable with which the image is compatible
+   * @param prod The source of image data for this image
+   * @param cm The ColorModel associated with drawable
+   */
+  XOffScreenImage (XGraphicsConfiguration config, Drawable drawable, ImageProducer prod, ColorModel cm)
+  {
+    this.config = config;
+    this.width = 0;  // size will be overridden in a moment
+    this.height = 0;
+    this.drawable = drawable;
+    this.prod = prod;
+    pixmapColorModel = cm;
+    prod.startProduction (this);
+  }
+  
+  /** Get the pixmap which contains this image
+   * @return The pixmap
+   */
+  public Pixmap getPixmap ()
+  {
+    return pixmap;
+  }
+  
+  /** Flushes (that is, destroys) any resources used for this image.  This
+   * includes the actual image data.
+   */
+  public void flush ()
+  {
+    // FIXME: should dispose pixmap
+    pixmap = null;
+  }
+  
+  /** Returns a graphics context object for drawing an off-screen object.
+   * This method is only valid for off-screen objects.
+   *
+   * @return a graphics context object for an off-screen object
+   * @see Graphics#createImage(int, int)
+   */
+  public Graphics getGraphics ()
+  {
+    DirectRasterGraphics gfxDevice = new XGraphics (pixmap, config);
+    IntegerGraphicsState igState = new IntegerGraphicsState (gfxDevice);
+    Graphics2DImpl gfx2d = new Graphics2DImpl (config);
+    gfx2d.setState (igState);
+    return gfx2d;
+  }
+  
+  /** Returns the height of the image, or -1 if it is unknown.  If the
+   * image height is unknown, the observer object will be notified when
+   * the value is known.
+   *
+   * @param observer the image observer for this object
+   * @return the height in pixels
+   * @see #getWidth(ImageObserver)
+   */
+  public int getHeight (ImageObserver observer)
+  {
+    return height;
+  }
+  
+  /** Returns the height of the image, or -1 if it is unknown.  If the
+   * image height is unknown, the observer object will be notified when
+   * the value is known.
+   *
+   * @return the height in pixels
+   * @see #getWidth()
+   */
+  public int getHeight ()
+  {
+    return height;
+  }
+  
+  /** Returns the image producer object for this object. The producer is the
+   * object which generates pixels for this image.
+   *
+   * @return the image producer for this object
+   */
+  public ImageProducer getSource ()
+  {
+    if (prod == null)
+      throw new UnsupportedOperationException ("getSource not supported");
+    else
+      return prod;
+  }
+  
+  /** Returns the width of the image, or -1 if it is unknown.  If the
+   * image width is unknown, the observer object will be notified when
+   * the value is known.
+   *
+   * @param observer the image observer for this object
+   * @return the width in pixels
+   * @see #getHeight(ImageObserver)
+   */
+  public int getWidth (ImageObserver observer)
+  {
+    return width;
+  }
+  
+  /** Returns the width of the image, or -1 if it is unknown.  If the
+   * image width is unknown, the observer object will be notified when
+   * the value is known.
+   *
+   * @return the width in pixels
+   * @see #getHeight()
+   */
+  public int getWidth ()
+  {
+    return width;
+  }
+
+  /** This method requests a named property for an object.  The value of the
+   * property is returned. The value <code>UndefinedProperty</code> is
+   * returned if there is no property with the specified name.  The value
+   * <code>null</code> is returned if the properties for the object are
+   * not yet known.  In this case, the specified image observer is notified
+   * when the properties are known.
+   *
+   * @param name the requested property name
+   * @param observer the image observer for this object
+   * @return the named property, if available
+   * @see #UndefinedProperty
+   */
+  public Object getProperty (String name, ImageObserver observer)
+  {
+    return null;
+  }
+  
+  /** Get the GraphicsConfiguration to which this image is coupled
+   * @return the GraphicsConfiguration
+   */
+  public GraphicsConfiguration getGraphicsConfiguration ()
+  {
+    return config;
+  }
+  
+  public void imageComplete (int status)
+  {
+  }
+  
+  public void setColorModel (ColorModel model)
+  {
+  }
+  
+  public void setDimensions (int width, int height)
+  {
+    this.width = width;
+    this.height = height;
+    pixmap = new Pixmap (drawable, width, height, drawable.getDepth ());
+    gc = GC.create (pixmap);
+  }
+  
+  public void setHints (int flags)
+  {
+  }
+  
+  public void setPixels (int x, int y, int w, int h, ColorModel model, int[] pixels, int offset, int scansize)
+  {
+    int idx = 0;
+    float[] normalizedComponents = new float [4];
+    int[] unnormalizedComponents = { 0, 0, 0, 0xff };
+    normalizedComponents[3] = 1;
+    for (int yp=y; yp < (y + h); yp++)
+    {
+      for (int xp=x; xp < (x + w); xp++)
+      {
+        int p = (yp - y) * scansize + (xp - x) + offset;
+        // FIXME: there HAS to be a more efficient mechanism for color mapping
+        normalizedComponents[0] = (float)model.getRed (pixels[p]) / 255F;
+        normalizedComponents[1] = (float)model.getGreen (pixels[p]) / 255F;
+        normalizedComponents[2] = (float)model.getBlue (pixels[p]) / 255F;
+        pixmapColorModel.getUnnormalizedComponents (normalizedComponents, 0,
+          unnormalizedComponents, 0);
+        int pixelColor = pixmapColorModel.getDataElement (unnormalizedComponents, 0);
+        gc.setForeground (pixelColor);
+        gc.drawPoint (xp, yp);
+      }
+    }
+  }
+  
+  public void setPixels (int x, int y, int w, int h, ColorModel model, byte[] pixels, int offset, int scansize)
+  {
+    int idx = 0;
+    float[] normalizedComponents = new float [4];
+    int[] unnormalizedComponents = { 0, 0, 0, 0xff };
+    normalizedComponents[3] = 1;
+    for (int yp=y; yp < (y + h); yp++)
+    {
+      for (int xp=x; xp < (x + w); xp++)
+      {
+        // FIXME: there HAS to be a more efficient mechanism for color mapping
+        int p = (yp - y) * scansize + (xp - x) + offset;
+        normalizedComponents[0] = (float)model.getRed (pixels[p]) / 255F;
+        normalizedComponents[1] = (float)model.getGreen (pixels[p]) / 255F;
+        normalizedComponents[2] = (float)model.getBlue (pixels[p]) / 255F;
+        pixmapColorModel.getUnnormalizedComponents (normalizedComponents, 0,
+          unnormalizedComponents, 0);
+        int pixelColor = pixmapColorModel.getDataElement (unnormalizedComponents, 0);
+        gc.setForeground (pixelColor);
+        gc.drawPoint (xp, yp);
+      }
+    }
+  }
+  
+  public void setProperties (Hashtable props)
+  {
+  }
+  
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XPanelPeer.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XPanelPeer.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XPanelPeer.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XPanelPeer.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,61 @@
+/* Copyright (C) 2000, 2002, 2003  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.xlib;
+
+import java.awt.*;
+import java.awt.peer.*;
+import java.awt.image.*;
+import gnu.gcj.xlib.WMSizeHints;
+import gnu.gcj.xlib.WindowAttributes;
+import gnu.gcj.xlib.Display;
+import gnu.gcj.xlib.Visual;
+import gnu.gcj.xlib.Screen;
+
+public class XPanelPeer extends XCanvasPeer implements PanelPeer
+{
+
+  public XPanelPeer(Panel panel)
+  {
+    super(panel);
+  }
+
+  // no reason to override yet
+  //void initWindowProperties();
+  //gnu.gcj.xlib.Window getParentWindow();
+  
+
+  // Implementing ContainerPeer:
+  
+  // Default is no insets...
+  static final Insets INSETS_0_PROTOTYPE = new Insets(0, 0, 0, 0);
+
+  public Insets getInsets()
+  {
+    return (Insets) INSETS_0_PROTOTYPE.clone();
+  }
+
+  public Insets insets()
+  {
+    return getInsets();
+  }
+
+  public void beginValidate()
+  {
+    // NOP
+  }
+  
+  public void endValidate()
+  {
+    // NOP
+  }
+
+  public void beginLayout () { }
+  public void endLayout () { }
+  public boolean isPaintPending () { return false; }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XToolkit.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XToolkit.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XToolkit.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/awt/xlib/XToolkit.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,484 @@
+/* Copyright (C) 2000, 2002, 2003, 2005  Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+package gnu.awt.xlib;
+
+import java.awt.*;
+import java.awt.dnd.*;
+import java.awt.dnd.peer.*;
+import java.awt.font.*;
+import java.awt.im.*;
+import java.awt.peer.*;
+import java.awt.image.ImageProducer;
+import java.awt.image.ImageObserver;
+import java.net.*;
+import java.awt.datatransfer.Clipboard;
+import java.io.InputStream;
+import java.text.AttributedString;
+import java.util.Map;
+import java.util.Properties;
+import gnu.gcj.xlib.Display;
+import gnu.gcj.xlib.Screen;
+import gnu.gcj.xlib.Visual;
+import gnu.java.awt.ClasspathToolkit;
+import gnu.java.awt.EmbeddedWindow;
+import gnu.java.awt.peer.ClasspathFontPeer;
+import gnu.java.awt.peer.EmbeddedWindowPeer;
+
+public class XToolkit extends ClasspathToolkit
+{
+  static XToolkit INSTANCE;
+  
+  Display display;
+
+  EventQueue queue;
+  XEventLoop eventLoop;
+
+  XGraphicsConfiguration defaultConfig;
+
+  public XToolkit()
+  {
+    INSTANCE = this;
+    display = new Display();
+    synchronized (display)
+      {
+	queue = new XEventQueue(display);
+	eventLoop = new XEventLoop(display, queue);
+      }
+  }
+
+  public void flushIfIdle()
+  {
+    eventLoop.flushIfIdle();
+  }
+
+  protected ButtonPeer createButton(Button frontend)
+  {
+    // FIXME: Stubbed out, needs Swing:
+    /*
+    XCanvasPeer realPeer = new XCanvasPeer(frontend);
+    SButtonPeer sbPeer = new SButtonPeer(frontend, realPeer);
+    return sbPeer;
+    */
+    return null;
+  }
+    
+  protected TextFieldPeer createTextField(TextField frontend)
+  {
+    return null; // FIXME
+  }
+    
+  protected LabelPeer createLabel(Label frontend) 
+  {
+    return null; // FIXME
+  }
+    
+  protected ListPeer createList(List frontend) 
+  {
+    return null; // FIXME
+  }
+  
+  protected CheckboxPeer createCheckbox(Checkbox frontend) 
+  {
+    return null; // FIXME
+  }
+    
+  protected ScrollbarPeer createScrollbar(Scrollbar frontend) 
+  {
+    return null; // FIXME
+  }
+  
+  protected ScrollPanePeer createScrollPane(ScrollPane frontend) 
+  {
+    return null; // FIXME
+  }
+  
+  protected TextAreaPeer createTextArea(TextArea frontend) 
+  {
+    return null; // FIXME
+  }
+  
+  protected ChoicePeer createChoice(Choice frontend) 
+  {
+    return null; // FIXME
+  }
+  
+  protected FramePeer createFrame(Frame frontend) {
+    return new XFramePeer(frontend);
+  }
+
+  protected CanvasPeer createCanvas(Canvas frontend) {
+    XCanvasPeer peer = new XCanvasPeer(frontend);
+    return peer;
+  }
+  
+  protected PanelPeer createPanel(Panel frontend) {
+    return new XPanelPeer(frontend);
+  }
+
+  protected WindowPeer createWindow(Window frontend) 
+  {
+    return null; // FIXME
+  }
+    
+  protected DialogPeer createDialog(Dialog frontend) 
+  {
+    return null; // FIXME
+  }
+  
+  protected MenuBarPeer createMenuBar(MenuBar frontend) 
+  {
+    return null; // FIXME
+  }
+  
+  protected MenuPeer createMenu(Menu frontend) 
+  {
+    return null; // FIXME
+  }
+  
+  protected PopupMenuPeer createPopupMenu(PopupMenu frontend) 
+  {
+    return null; // FIXME
+  }
+  
+  protected MenuItemPeer createMenuItem(MenuItem frontend) 
+  {
+    return null; // FIXME
+  }
+  
+  protected FileDialogPeer createFileDialog(FileDialog frontend) 
+  {
+    return null; // FIXME
+  }
+  
+  protected CheckboxMenuItemPeer
+      createCheckboxMenuItem(CheckboxMenuItem frontend) 
+  {
+    return null; // FIXME
+  }
+
+  protected java.awt.peer.FontPeer getFontPeer(String name, int style) 
+  {
+    return new XFontPeer (name,style);
+  }
+
+  public Dimension getScreenSize()
+  { 
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public int getScreenResolution()
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+  
+  public java.awt.image.ColorModel getColorModel()
+  {
+    return getDefaultXGraphicsConfiguration().getColorModel();
+  }
+
+  public String[] getFontList()
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public FontMetrics getFontMetrics(Font font)
+  {
+    return getDefaultXGraphicsConfiguration().getXFontMetrics(font);
+  }
+
+  public void sync()
+  {
+    flushIfIdle ();
+    // FIXME: should instead wait for eventLoop to go idle
+    // (perhaps send a dummy event there and block till it makes
+    // it through the queue)
+  }
+    
+  public Image getImage(String filename)
+  {
+    return createImage(filename);
+  }
+  
+  public Image getImage(URL url)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public Image createImage(String filename)
+  {
+    // FIXME: Stubbed out. We need a proper image I/O API.
+
+    /*
+    BufferedImage jpeg;
+    FileInputStream fis = openFile(filename);
+    if (fis == null)
+      return null;
+    
+    BasicRasterImageConsumer consumer = new BasicRasterImageConsumer();
+    JPEGImageDecoder jid = new JPEGImageDecoder(fis);
+
+    jid.startProduction(consumer);
+    jpeg = consumer.getImage();
+    
+    int w = jpeg.getWidth();
+    int h = jpeg.getHeight();
+    
+    BufferedImage img =
+      getDefaultXGraphicsConfiguration().createCompatibleImage(w, h);
+    
+    Renderers renderers = Renderers.getInstance();
+    
+    RasterOp renderer = renderers.createRenderer(jpeg.getColorModel(),
+						 jpeg.getSampleModel(),
+						 img.getColorModel(),
+						 img.getSampleModel());
+	
+    if (renderer == null)
+      {
+	throw new UnsupportedOperationException("couldn't find renderer");
+      }
+
+    renderer.filter(jpeg.getRaster(), img.getRaster());
+    
+    return img;
+    */
+
+    return null;
+  }
+
+  public Image createImage(URL url)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public boolean prepareImage(Image image,
+			      int width,
+			      int height,
+			      ImageObserver observer)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+  
+  public int checkImage(Image image,
+			int width,
+			int height,
+			ImageObserver observer)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+  
+  public Image createImage(ImageProducer producer)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public Image createImage(byte[] imagedata,
+			   int imageoffset,
+			   int imagelength)
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  /*
+    public PrintJob getPrintJob(Frame frame,
+				String jobtitle,
+				Properties props);
+  */
+
+  public void beep()
+  {
+    throw new UnsupportedOperationException("not implemented yet");
+  }
+
+  public Clipboard getSystemClipboard() 
+  {
+    return null; // FIXME
+  }
+    
+  protected EventQueue getSystemEventQueueImpl()
+  {
+    return queue;
+  }
+    
+  public PrintJob getPrintJob (Frame frame, String title, Properties props)
+  {
+    return null;		// FIXME
+  }
+
+  XGraphicsConfiguration getDefaultXGraphicsConfiguration()
+  {
+    if (defaultConfig == null)
+      {
+	Screen screen = display.getDefaultScreen();
+	Visual visual = screen.getRootVisual();
+	defaultConfig = new XGraphicsConfiguration(visual);
+
+	// ASSERT:
+	if (!defaultConfig.getVisual().getScreen().equals(screen))
+	  {
+	    String msg = "screen of graphics configuration is not " +
+	      "default screen";
+	    throw new Error(msg);
+	  }
+      }
+    
+    return defaultConfig;
+  }
+
+  public DragSourceContextPeer
+    createDragSourceContextPeer(DragGestureEvent dge)
+    throws InvalidDnDOperationException
+  {
+    throw new UnsupportedOperationException("not implemented");  
+  }
+
+  public DragGestureRecognizer
+    createDragGestureRecognizer(Class abstractRecognizerClass,
+				DragSource ds, Component c,
+				int srcActions, DragGestureListener dgl)
+  {
+    throw new UnsupportedOperationException("not implemented");
+  }
+
+    
+  public Map mapInputMethodHighlight(InputMethodHighlight highlight)
+  {
+    throw new UnsupportedOperationException("not implemented");
+  }
+  
+  /** Returns a shared instance of the local, platform-specific
+   * graphics environment.
+   *
+   * <p>This method is specific to GNU Classpath. It gets called by
+   * the Classpath implementation of {@link
+   * GraphicsEnvironment.getLocalGraphcisEnvironment()}.
+   */
+  public GraphicsEnvironment getLocalGraphicsEnvironment ()
+  {
+    return new XGraphicsEnvironment (this);
+  }
+  
+  /** Acquires an appropriate {@link ClasspathFontPeer}, for use in
+   * classpath's implementation of {@link java.awt.Font}.
+   *
+   * @param name The logical name of the font. This may be either a face
+   * name or a logical font name, or may even be null. A default
+   * implementation of name decoding is provided in
+   * {@link ClasspathFontPeer}, but may be overridden in other toolkits.
+   *
+   * @param attrs Any extra {@link java.awt.font.TextAttribute} attributes
+   * this font peer should have, such as size, weight, family name, or
+   * transformation.
+   */
+  public ClasspathFontPeer getClasspathFontPeer (String name, Map attrs)
+  {
+    int style = Font.PLAIN;
+    float size = 12;
+
+    if (attrs.containsKey (TextAttribute.WEIGHT))
+      {
+        Float weight = (Float) attrs.get (TextAttribute.WEIGHT);
+        if (weight.floatValue () >= TextAttribute.WEIGHT_BOLD.floatValue ())
+          style += Font.BOLD;
+      }
+
+    if (attrs.containsKey (TextAttribute.POSTURE))
+      {
+        Float posture = (Float) attrs.get (TextAttribute.POSTURE);
+        if (posture.floatValue () >= TextAttribute.POSTURE_OBLIQUE.floatValue ())
+          style += Font.ITALIC;
+      }
+
+    if (attrs.containsKey (TextAttribute.SIZE))
+      {
+        Float fsize = (Float) attrs.get (TextAttribute.SIZE);
+        size = fsize.floatValue ();
+      }
+
+    return new XFontPeer (name,style,size);
+  }
+
+  /** Creates a font, reading the glyph definitions from a stream.
+   *
+   * <p>This method provides the platform-specific implementation for
+   * the static factory method {@link Font#createFont(int,
+   * java.io.InputStream)}.
+   *
+   * @param format the format of the font data, such as {@link
+   * Font#TRUETYPE_FONT}. An implementation may ignore this argument
+   * if it is able to automatically recognize the font format from the
+   * provided data.
+   *
+   * @param stream an input stream from where the font data is read
+   * in. The stream will be advanced to the position after the font
+   * data, but not closed.
+   *
+   * @throws IllegalArgumentException if <code>format</code> is
+   * not supported.
+   *
+   * @throws FontFormatException if <code>stream</code> does not
+   * contain data in the expected format, or if required tables are
+   * missing from a font.
+   *
+   * @throws IOException if a problem occurs while reading in the
+   * contents of <code>stream</code>.
+   */
+  public Font createFont (int format, InputStream stream)
+  {
+    throw new java.lang.UnsupportedOperationException ();
+  }
+
+  public RobotPeer createRobot (GraphicsDevice screen) throws AWTException
+  {
+    throw new java.lang.UnsupportedOperationException ();
+  }
+
+  public EmbeddedWindowPeer createEmbeddedWindow (EmbeddedWindow w)
+  {
+    throw new java.lang.UnsupportedOperationException ();
+  }
+
+  public boolean nativeQueueEmpty() 
+  {
+    // Tell EventQueue the native queue is empty, because XEventLoop
+    // separately ensures that native events are posted to AWT.
+    return true;
+  }
+
+  public void wakeNativeQueue() 
+  {
+    // Not implemented, because the native queue is always awake.
+    // (i.e. it's polled in a thread separate from the AWT dispatch thread)
+  }
+
+  /** Checks the native event queue for events.  If blocking, waits until an
+   * event is available before returning, unless interrupted by
+   * wakeNativeQueue.  If non-blocking, returns immediately even if no
+   * event is available.
+   *
+   * @param locked The calling EventQueue
+   * @param block If true, waits for a native event before returning
+   */
+  public void iterateNativeQueue(java.awt.EventQueue locked, boolean block) 
+  {
+    // There is nothing to do here except block, because XEventLoop 
+    // iterates the queue in a dedicated thread.
+    if (block)
+    {
+      try
+      {
+        queue.wait ();
+      }
+      catch (InterruptedException ie)
+      {
+        // InterruptedException intentionally ignored
+      }
+    }
+  }; 
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/classpath/SystemProperties.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/classpath/SystemProperties.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/classpath/SystemProperties.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/classpath/SystemProperties.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,157 @@
+/* SystemProperties.java -- Manage the System properties.
+   Copyright (C) 2004, 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath;
+
+import java.util.Properties;
+
+/**
+ * The class manages the System properties. This class is only available to
+ * privileged code (i.e. code loaded by the bootstrap class loader) and
+ * therefore doesn't do any security checks.
+ * This class is separated out from java.lang.System to simplify bootstrap
+ * dependencies and to allow trusted code a simple and efficient mechanism
+ * to access the system properties.
+ */
+public class SystemProperties
+{
+  /**
+   * Stores the current system properties. This can be modified by
+   * {@link #setProperties(Properties)}, but will never be null, because
+   * setProperties(null) sucks in the default properties.
+   */
+  private static Properties properties;
+
+  /**
+   * The default properties. Once the default is stabilized,
+   * it should not be modified;
+   * instead it is cloned when calling <code>setProperties(null)</code>.
+   */
+  private static final Properties defaultProperties = new Properties();
+
+  private static native void insertSystemProperties(Properties properties);
+
+  static
+  {
+    insertSystemProperties(defaultProperties);
+
+    defaultProperties.put("gnu.classpath.version",
+                          Configuration.CLASSPATH_VERSION);
+
+    // Set base URL if not already set.
+    if (defaultProperties.get("gnu.classpath.home.url") == null)
+      defaultProperties.put("gnu.classpath.home.url",
+			    "file://"
+			    + defaultProperties.get("gnu.classpath.home")
+	                    + "/lib");
+
+    // Set short name if not already set.
+    if (defaultProperties.get("gnu.classpath.vm.shortname") == null)
+      {
+	String value = defaultProperties.getProperty("java.vm.name");
+	int index = value.lastIndexOf(' ');
+	if (index != -1)
+	  value = value.substring(index + 1);
+	defaultProperties.put("gnu.classpath.vm.shortname", value);
+      }
+
+    // Network properties
+    if (defaultProperties.get("http.agent") == null)
+      {
+	String userAgent = ("gnu-classpath/"
+	                    + defaultProperties.getProperty("gnu.classpath.version")
+	                    + " ("
+	                    + defaultProperties.getProperty("gnu.classpath.vm.shortname")
+	                    + "/"
+	                    + defaultProperties.getProperty("java.vm.version")
+	                    + ")");
+	 defaultProperties.put("http.agent", userAgent);
+      }
+
+    defaultProperties.put("gnu.cpu.endian",
+			  isWordsBigEndian() ? "big" : "little");
+
+    // XXX FIXME - Temp hack for old systems that set the wrong property
+    if (defaultProperties.get("java.io.tmpdir") == null)
+      defaultProperties.put("java.io.tmpdir",
+                            defaultProperties.get("java.tmpdir"));
+
+    // Note that we use clone here and not new.  Some programs assume
+    // that the system properties do not have a parent.
+    properties = (Properties) defaultProperties.clone();
+  }
+
+  public static String getProperty(String name)
+  {
+    return properties.getProperty(name);
+  }
+
+  public static String getProperty(String name, String defaultValue)
+  {
+    return properties.getProperty(name, defaultValue);
+  }
+
+  public static String setProperty(String name, String value)
+  {
+    return (String) properties.setProperty(name, value);
+  }
+
+  public static Properties getProperties()
+  {
+    return properties;
+  }
+
+  public static void setProperties(Properties properties)
+  {
+    if (properties == null)
+      {
+        // Note that we use clone here and not new.  Some programs
+        // assume that the system properties do not have a parent.
+        properties = (Properties)defaultProperties.clone();
+      }
+
+    SystemProperties.properties = properties;
+  }
+
+  /**
+   * Detect big-endian systems.
+   *
+   * @return true if the system is big-endian.
+   */
+  private static native boolean isWordsBigEndian();
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/VMFrame.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/VMFrame.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/VMFrame.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/VMFrame.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,106 @@
+/* VMFrame.java -- Reference implementation of VM hooks for JDWP Frame access.
+   Copyright (C) 2005, 2006 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp;
+
+import gnu.classpath.jdwp.util.Location;
+
+/**
+ * Reference implementation of VM hooks for JDWP Frame access.
+ * 
+ * @author aluchko 
+ */
+
+public class VMFrame
+{
+  /**
+   * Returns the size of a frame ID over JDWP
+   */
+  public static final int SIZE = 8;
+
+  // The object this frame resides in
+  private Object obj;
+  
+  // The current location of this frame
+  private Location loc;
+  
+  // id of this frame
+  private long id;
+  
+  /**
+   * Gets the current location of the frame.
+   */
+  public Location getLocation()
+  {
+    return loc;
+  }
+
+  /**
+   * Returns the value of the variable in the given slot.
+   * 
+   * @param slot the slot containing the variable
+   */
+  public native Object getValue(int slot);
+
+  /**
+   * Assigns the given variable to the given value. 
+   * @param slot The slot which contains the variable
+   * @param value The value to assign the variable to
+   */
+  public native void setValue(int slot, Object value);
+
+  /**
+   * Get the object which is represented by 'this' in the context of the frame,
+   * returns null if the method is native or static.
+   */
+  public Object getObject()
+  {
+    return obj;
+  }
+
+  /**
+   * Get the frameID
+   * @return an id which is unique within the scope of the VM
+   */
+  public long getId()
+  {
+    return id;
+  }
+
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/VMIdManager.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/VMIdManager.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/VMIdManager.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/VMIdManager.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,427 @@
+/* VMIdManager.java -- A reference/example implementation of a manager for
+   JDWP object/reference type IDs
+
+   Copyright (C) 2005, 2006 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp;
+
+import gnu.classpath.jdwp.exception.InvalidClassException;
+import gnu.classpath.jdwp.exception.InvalidObjectException;
+import gnu.classpath.jdwp.id.*;
+
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.SoftReference;
+import java.nio.ByteBuffer;
+import java.util.HashMap;
+import java.util.Hashtable;
+
+/**
+ * This class manages objects and referencetypes that are reported
+ * to the debugger. All objects and referencetypes reported to the
+ * debugger should go through this manager.
+ *
+ * A brief summary of what an <code>IdManager</code> must provide:
+ *
+ * <code>
+ * public ObjectId getObjectId (Object theObject);
+ * public ObjectId get (long id);
+ * public ObjectId readObjectId (ByteBuffer bb);
+ * public ReferenceTypeId getReferenceTypeId (Class clazz);
+ * public ReferenceTypeId getReferenceType (long id);
+ * public ReferenceTypeId readReferenceTypeId (ByteBuffer bb);
+ * </code>
+ *
+ * See the javadoc on these methods later in this file for more
+ * information on these functions.
+ *
+ * <b>NOTE:</b> All IDs handled by the ID manager (all object and reference
+ * type IDs) are assumed to be of type <code>long</code>.
+ *
+ * <b>NOTE:</b> This class does not manage virtual machine-specific types,
+ * like methods, fields, and frames. These already have unique IDs within
+ * the virtual machine and do not need further abstraction here.
+ *
+ * @author Keith Seitz  (keiths at redhat.com)
+ */
+public class VMIdManager
+{
+  // This factory generates ids for objects and types that may
+  // be sent to a debugger.
+  private static class IdFactory
+  {
+    // ID of last object / referencetype
+    private static Object _idLock = new Object ();
+    private static Object _ridLock = new Object ();
+    private static long _lastId = 0;
+    private static long _lastRid = 0;
+
+    // A list of all ID types
+    private static HashMap _idList = new HashMap ();
+
+    // Initialize the id list with known types
+    static
+    {
+      // ObjectId and ArrayId are special cases. See newObjectId.
+      _idList.put (ClassLoaderId.typeClass, ClassLoaderId.class);
+      _idList.put (ClassObjectId.typeClass, ClassObjectId.class);
+      _idList.put (StringId.typeClass, StringId.class);
+      _idList.put (ThreadId.typeClass, ThreadId.class);
+      _idList.put (ThreadGroupId.typeClass, ThreadGroupId.class);
+    }
+
+    /**
+     * Returns a new id for the given object
+     *
+     * @param obj  SoftReference of the object for which an id is desired
+     * @returns a suitable object id
+     */
+    public static ObjectId newObjectId (SoftReference obj)
+    {
+      ObjectId id = null;
+      Object object = obj.get ();
+
+      // Special case: arrays
+      if (object.getClass ().isArray ())
+	id = new ArrayId ();
+      else
+	{
+	  // Loop through all classes until we hit baseclass
+	  Class myClass;
+	  for (myClass = object.getClass (); myClass != null;
+	       myClass = myClass.getSuperclass ())
+	    {
+	      Class clz = (Class) _idList.get (myClass);
+	      if (clz != null)
+		{
+		  try
+		    {
+		      id = (ObjectId) clz.newInstance ();
+		      synchronized (_idLock)
+			{
+			  id.setId (++_lastId);
+			}
+		      id.setReference (obj);
+		      return id;
+		    }
+		  catch (InstantiationException ie)
+		    {
+		      // This really should not happen
+		      throw new RuntimeException ("cannot create new ID", ie);
+		    }
+		  catch (IllegalAccessException iae)
+		    {
+		      // This really should not happen
+		      throw new RuntimeException ("illegal access of ID", iae);
+		    }
+		}
+	    }
+
+	  /* getSuperclass returned null and no matching ID type found.
+	     So it must derive from Object. */
+	  id = new ObjectId ();
+	}
+
+      synchronized (_idLock)
+	{
+	  id.setId (++_lastId);
+	}
+      id.setReference (obj);
+      return id;
+    }
+
+    /**
+     * Returns a new reference type id for the given class
+     *
+     * @param ref  SoftReference to the desired type
+     * @returns a suitable reference type id or null when the
+     * reference is cleared.
+     */
+    public static ReferenceTypeId newReferenceTypeId (SoftReference ref)
+    {
+      ReferenceTypeId id;
+      Class clazz = (Class) ref.get ();
+      if (clazz == null)
+	return null;
+
+      if (clazz.isArray ())
+	id = new ArrayReferenceTypeId ();
+      else if (clazz.isInterface ())
+	id = new InterfaceReferenceTypeId ();
+      else
+	id = new ClassReferenceTypeId ();
+      id.setReference (ref);
+      synchronized (_ridLock)
+	{
+	  id.setId (++_lastRid);
+	}
+      return id;
+    }
+  }
+
+  /**
+   * This class is a SoftReferenceIdentity type that is used by
+   * the ID manager.
+   */
+  class ReferenceKey extends SoftReference
+  {
+    // Hash code of referent
+    private int _hash;
+
+    /**
+     * Constructs a new <code>ReferenceKey</code> object
+     * with the given referent.
+     *
+     * <p>This constructor should only be used for object lookups
+     * by the backend.
+     *
+     * @param referent  the object to reference
+     */
+    public ReferenceKey (Object referent)
+    {
+      super (referent);
+      _hash = referent.hashCode ();
+    }
+    
+    /**
+     * Constructs a new <code>ReferenceKey</code> object
+     * with the given referent and reference queue.
+     *
+     * <p>The JDWP back-end stores a <code>ReferenceKey</code>
+     * with its corresponding <code>JdwpId</code>. This constructor
+     * is used by the back-end when adding new IDs to be managed.
+     *
+     * @param referent  the object to reference
+     * @param queue     the queue to which to report garbage collections
+     */
+    public ReferenceKey (Object referent, ReferenceQueue queue)
+    {
+      super (referent, queue);
+      _hash = referent.hashCode ();
+    }
+    
+    /**
+     * Returns the hash code of the referent.
+     * This seems hacky, but is required in order to use this class
+     * as a hash table key.
+     *
+     * @returns the hash code of the referent
+     */
+    public int hashCode ()
+    {
+      return _hash;
+    }
+
+    /**
+     * Comparator for keys
+     *
+     * This method can be used in two ways:
+     *
+     * <ol>
+     *    <li>For table lookups, where we want to compare referents</li>
+     *    <li>For clearing GCd objects, where we want to compare the actual
+     *        key object (not the referent)</li>
+     * </ol>
+     */
+    public boolean equals (Object obj)
+    {
+      if (obj instanceof ReferenceKey)
+	{
+	  ReferenceKey ref = (ReferenceKey) obj;
+	  
+	  /* First check if the two references are the same.
+	     If they are, that means we must be clearing GCd objects. */
+	  if (this == obj)
+	    return true;
+	  
+	  return (ref.get () == get ());
+	}
+      
+      return false;
+    }
+  }
+  
+  // instance of VMIdManager
+  private static VMIdManager _idm = new VMIdManager ();
+
+  // A reference queue for our objects
+  private ReferenceQueue _refQueue;
+
+  // Mapping of objects (ReferenceKey) to IDs (ObjectId)
+  private Hashtable _oidTable;
+
+  // Mapping of ID numbers (Long) to IDs (ObjectId)
+  private Hashtable _idTable;
+
+  /* Mapping of class (ReferenceKey) to IDs (ReferenceTypeId) for reference
+     types. Unlike other types, reference id types are NEVER released. */
+  private Hashtable _classTable;
+
+  // Mapping of ID numbers (Long) to reference type IDs (ReferenceTypeId)
+  private Hashtable _ridTable;
+
+  /**
+   * Gets the instance of VMIdManager, constructing a new one
+   * if none currently exists.
+   */
+  public static VMIdManager getDefault ()
+  {
+    return _idm;
+  }
+
+  // Constructs a new <code>IdManager</code>
+  private VMIdManager ()
+  {
+    _refQueue = new ReferenceQueue ();
+    _oidTable = new Hashtable (50);
+    _idTable = new Hashtable (50);
+    _classTable = new Hashtable (20);
+    _ridTable = new Hashtable (20);
+  }
+
+  // Updates the object ID table, removing IDs whose objects have
+  // been garbage collected.
+  private void _update ()
+  {
+    Reference ref;
+    while ((ref = _refQueue.poll ()) != null)
+      {
+	ObjectId id = (ObjectId) _oidTable.get (ref);
+	_oidTable.remove (ref);
+	_idTable.remove (new Long (id.getId ()));
+      }
+  }
+
+  /**
+   * Returns an id for the given object, adding it
+   * if it does not have an id.
+   *
+   * @param theObject  the object to get an ID/add
+   * @returns  the ID of the object
+   */
+  public ObjectId getObjectId (Object theObject)
+  {
+    ReferenceKey ref = new ReferenceKey (theObject, _refQueue);
+    ObjectId id = (ObjectId) _oidTable.get (ref);
+    if (id == null)
+      {
+	// update the tables -- this is an arbitrary place to put this
+	_update ();
+
+	// Object not found. Make new id for it
+	id = IdFactory.newObjectId (ref);
+	_oidTable.put (ref, id);
+	_idTable.put (new Long (id.getId ()), id);
+      }
+
+    return id;
+  }
+
+  /**
+   * Returns the <code>JdwpId</code> for a given ID. Unlike
+   * <code>getId</code>, it throws an exception if the ID is not
+   * known.
+   *
+   * @param id  the numerical ID of the desired <code>JdwpId</code>
+   * @throws InvalidObjectException if the ID is not found
+   */
+  public ObjectId get (long id)
+    throws InvalidObjectException
+  {
+    ObjectId oid = (ObjectId) _idTable.get (new Long (id));
+    if (oid == null)
+      throw new InvalidObjectException (id);
+ 
+    return oid;
+  }
+
+  public ObjectId readObjectId (ByteBuffer bb)
+    throws InvalidObjectException
+  {
+    long id = bb.getLong ();
+    return get (id);
+  }
+
+  /**
+   * Gets the reference type id for the given class, creating
+   * a new one if it does not already have an id
+   *
+   * @param clazz  the class for which to get an ID
+   * @returns  the ID of the class
+   */
+  public ReferenceTypeId getReferenceTypeId (Class clazz)
+  {
+    ReferenceKey ref = new ReferenceKey (clazz);
+    ReferenceTypeId id = (ReferenceTypeId)_classTable.get (ref);
+    if (id == null)
+      {
+	// Object not found. Make new id for it
+	id = IdFactory.newReferenceTypeId (ref);
+	_classTable.put (ref, id);
+	_ridTable.put (new Long (id.getId ()), id);
+      }
+
+    return id;
+  }
+
+  /**
+   * Returns the <code>ReferenceTypeId</code> for a given ID. Unlike
+   * <code>getReferenceTypeId</code>, it throws an exception if the ID is not
+   * known.
+   *
+   * @param id  the numerical ID of the desired reference type
+   * @throws InvalidClassException if the ID is not found
+   */
+  public ReferenceTypeId getReferenceType (long id)
+    throws InvalidClassException
+  {
+    ReferenceTypeId rid = (ReferenceTypeId) _ridTable.get (new Long (id));
+    if (rid == null)
+      throw new InvalidClassException (id);
+ 
+    return rid;
+  }
+
+  public ReferenceTypeId readReferenceTypeId (ByteBuffer bb)
+    throws InvalidClassException
+  {
+    long id = bb.getLong ();
+    return getReferenceType (id);
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/VMMethod.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/VMMethod.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/VMMethod.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/VMMethod.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,178 @@
+/* VMMethod.java -- a method in a virtual machine
+   Copyright (C) 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.util.LineTable;
+import gnu.classpath.jdwp.util.VariableTable;
+
+/**
+ * This class is really an amalgamation of two classes: one class
+ * represents a virtual machine method and the other represents
+ * the JDWP back-end's ID for the method.
+ *
+ * @author Keith Seitz  (keiths at redhat.com)
+ */
+public class VMMethod
+{
+  /**
+   * Returns the size of a JDWP method ID
+   * @see gnu.classpath.jdwp.id.JdwpId#SIZE
+   */
+   public static final int SIZE = 8;
+
+  // The class in which this method is declared
+  private Class _class;
+
+  // The method's ID
+  private long _methodId;
+
+  /**
+   * Constructs a new VMMethod object. This constructor is protected
+   * so that only the factory methods of VMVirtualMachine can be used
+   * to create VMMethods.
+   *
+   * @param klass the method's containing class
+   * @param id    method identifier, e.g., jmethodID
+   * @see gnu.classpath.jdwp.VMVirtualMachine#getAllClassMethods
+   * @see gnu.classpath.jdwp.VMVirtualMachine#getClassMethod
+   */
+  protected VMMethod(Class klass, long id)
+  {
+    _class = klass;
+    _methodId = id;
+  }
+
+  /**
+   * Returns the internal method ID for this method
+   */
+  public long getId()
+  {
+    return _methodId;
+  }
+
+  /**
+   * Returns the method's declaring class
+   */
+  public Class getDeclaringClass()
+  {
+    return _class;
+  }
+
+  /**
+   * Returns the name of this method
+   */
+  public native String getName();
+
+  /**
+   * Returns the signature of this method
+   */
+  public native String getSignature();
+
+  /**
+   * Returns the method's modifier flags
+   */
+  public native int getModifiers();
+
+  /**
+   * "Returns line number information for the method, if present. The line
+   * table maps source line numbers to the initial code index of the line.
+   * The line table is ordered by code index (from lowest to highest). The
+   * line number information is constant unless a new class definition is
+   * installed using RedefineClasses."
+   *
+   * @return the line table
+   * @throws JdwpException
+   */
+  public native LineTable getLineTable()
+    throws JdwpException;
+
+  /**
+   * "Returns variable information for the method. The variable table
+   * includes arguments and locals declared within the method. For instance
+   * methods, the "this" reference is included in the table. Also, synthetic
+   * variables may be present."
+   *
+   * @return the variable table
+   * @throws JdwpException
+   */
+  public native VariableTable getVariableTable()
+    throws JdwpException;
+
+  /**
+   * Returns a string representation of this method (not
+   * required but nice for debugging).
+   */
+  public String toString()
+  {
+    return getDeclaringClass().getName() + "." + getName();
+  }
+
+  /**
+   * Writes the method's ID to the output stream
+   *
+   * @param ostream the output stream to which to write
+   * @throws IOException for any errors writing to the stream
+   * @see gnu.classpath.jdwp.id.JdwpId#write
+   */
+  public void writeId(DataOutputStream ostream)
+    throws IOException
+  {
+    ostream.writeLong(getId());
+  }
+
+  /**
+   * Returns a VMMethod from the ID in the byte buffer
+   *
+   * @param klass the method's declaring class
+   * @param bb    a ByteBuffer containing the method's ID
+   * @throws JdwpException for any errors creating the method
+   * @throws IOException for any errors reading from the buffer
+   */
+  public static VMMethod readId(Class klass, ByteBuffer bb)
+    throws JdwpException, IOException
+  {
+    return VMVirtualMachine.getClassMethod(klass, bb.getLong());
+  }
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/VMVirtualMachine.java
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/VMVirtualMachine.java?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/VMVirtualMachine.java (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/VMVirtualMachine.java Thu Nov  8 16:56:19 2007
@@ -0,0 +1,335 @@
+/* VMVirtualMachine.java -- A reference implementation of a JDWP virtual
+   machine
+
+   Copyright (C) 2005, 2006 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp;
+
+import gnu.classpath.jdwp.event.EventRequest;
+import gnu.classpath.jdwp.exception.InvalidMethodException;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.util.MethodResult;
+import java.lang.reflect.Method;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+
+/**
+ * A virtual machine according to JDWP.
+ *
+ * @author Keith Seitz  <keiths at redhat.com>
+ */
+public class VMVirtualMachine
+{
+  // Thread suspension table. Maps Thread to suspend count (Integer)
+  private static Hashtable _jdwp_suspend_counts;
+
+  public static native void initialize ();
+
+  /**
+   * Suspend a thread
+   *
+   * @param  thread  the thread to suspend
+   */
+  public static native void suspendThread (Thread thread)
+    throws JdwpException;
+
+  /**
+   * Suspend all threads
+   */
+  public static void suspendAllThreads ()
+    throws JdwpException
+  {
+    // Our JDWP thread group -- don't suspend any of those threads
+    Thread current = Thread.currentThread ();
+    ThreadGroup jdwpGroup = Jdwp.getDefault().getJdwpThreadGroup();
+
+    // Find the root ThreadGroup
+    ThreadGroup group = jdwpGroup;
+    ThreadGroup parent = group.getParent ();
+    while (parent != null)
+      {
+	group = parent;
+	parent = group.getParent ();
+      }
+    
+    // Get all the threads in the system
+    int num = group.activeCount ();
+    Thread[] threads = new Thread[num];
+    group.enumerate (threads);
+
+    for (int i = 0; i < num; ++i)
+      {
+	Thread t = threads[i];
+	if (t != null)
+	  {
+	    if (t.getThreadGroup () == jdwpGroup || t == current)
+	      {
+		// Don't suspend the current thread or any JDWP thread
+		continue;
+	      }
+	    else
+	      suspendThread (t);
+	  }
+      }
+
+    // Now suspend the current thread
+    if (current.getThreadGroup() != jdwpGroup)
+      suspendThread (current);
+  }
+
+  /**
+   * Resume a thread. A thread must be resumed as many times
+   * as it has been suspended.
+   *
+   * @param  thread  the thread to resume
+   */
+  public static native void resumeThread (Thread thread)
+    throws JdwpException;
+
+  /**
+   * Resume all threads. This simply decrements the thread's
+   * suspend count. It can not be used to force the application
+   * to run.
+   */
+  public static void resumeAllThreads ()
+    throws JdwpException
+  {
+    // Our JDWP thread group -- don't resume
+    Thread current = Thread.currentThread ();
+    ThreadGroup jdwpGroup = current.getThreadGroup ();
+
+    // Find the root ThreadGroup
+    ThreadGroup group = jdwpGroup;
+    ThreadGroup parent = group.getParent ();
+    while (parent != null)
+      {
+	group = parent;
+	parent = group.getParent ();
+      }
+    
+    // Get all the threads in the system
+    int num = group.activeCount ();
+    Thread[] threads = new Thread[num];
+    group.enumerate (threads);
+
+    for (int i = 0; i < num; ++i)
+      {
+	Thread t = threads[i];
+	if (t != null)
+	  {
+	    if (t.getThreadGroup () == jdwpGroup || t == current)
+	      {
+		// Don't resume the current thread or any JDWP thread
+		continue;
+	      }
+	    else
+	      resumeThread (t);
+	  }
+      }
+  }
+
+  /**
+   * Get the suspend count for a give thread
+   *
+   * @param  thread  the thread whose suspend count is desired
+   * @return the number of times the thread has been suspended
+   */
+  public static native int getSuspendCount (Thread thread)
+    throws JdwpException;
+ 
+  /**
+   * Returns a count of the number of loaded classes in the VM
+   */
+  public static native int getAllLoadedClassesCount ()
+    throws JdwpException;
+
+  /**
+   * Returns an iterator over all the loaded classes in the VM
+   */
+  public static native Iterator getAllLoadedClasses ()
+    throws JdwpException;
+
+  /**
+   * Returns the status of the given class
+   *
+   * @param  clazz  the class whose status is desired
+   * @return a flag containing the class's status
+   * @see JdwpConstants.ClassStatus
+   */
+  public static native int getClassStatus (Class clazz)
+    throws JdwpException;
+
+  /**
+   * Returns all of the methods defined in the given class. This
+   * includes all methods, constructors, and class initializers.
+   *
+   * @param  klass  the class whose methods are desired
+   * @return an array of virtual machine methods
+   */
+  public static native VMMethod[] getAllClassMethods (Class klass)
+    throws JdwpException;
+
+  /**
+   * A factory method for getting valid virtual machine methods
+   * which may be passed to/from the debugger.
+   *
+   * @param klass the class in which the method is defined
+   * @param id    the ID of the desired method
+   * @return the desired internal representation of the method
+   * @throws InvalidMethodException if the method is not defined
+   *           in the class
+   * @throws JdwpException for any other error
+   */
+  public static native VMMethod getClassMethod(Class klass, long id)
+    throws JdwpException;
+
+  /**
+   * Returns the thread's call stack
+   *
+   * @param  thread  thread for which to get call stack
+   * @param  start   index of first frame to return
+   * @param  length  number of frames to return (-1 for all frames)
+   * @return a list of frames
+   */
+  public static native ArrayList getFrames (Thread thread, int start,
+					    int length)
+    throws JdwpException;
+
+  /**
+   * Returns the frame for a given thread with the frame ID in
+   * the buffer
+   *
+   * I don't like this.
+   *
+   * @param  thread  the frame's thread
+   * @param  bb      buffer containing the frame's ID
+   * @return the desired frame
+   */
+  public static native VMFrame getFrame (Thread thread, ByteBuffer bb)
+    throws JdwpException;
+
+  /**
+   * Returns the number of frames in the thread's stack
+   *
+   * @param  thread  the thread for which to get a frame count
+   * @return the number of frames in the thread's stack
+   */
+  public static native int getFrameCount (Thread thread)
+    throws JdwpException;
+
+
+  /**
+   * Returns the status of a thread
+   *
+   * @param  thread  the thread for which to get status
+   * @return integer status of the thread
+   * @see JdwpConstants.ThreadStatus
+   */
+  public static native int getThreadStatus (Thread thread)
+    throws JdwpException;
+
+  /**
+   * Returns a list of all classes which this class loader has been
+   * requested to load
+   *
+   * @param  cl  the class loader
+   * @return a list of all visible classes
+   */
+  public static native ArrayList getLoadRequests (ClassLoader cl)
+    throws JdwpException;
+
+  /**
+   * Executes a method in the virtual machine
+   *
+   * @param  obj         instance in which to invoke method (null for static)
+   * @param  thread      the thread in which to invoke the method
+   * @param  clazz       the class in which the method is defined
+   * @param  method      the method to invoke
+   * @param  values      arguments to pass to method
+   * @param  nonVirtual  "otherwise, normal virtual invoke
+   *                     (instance methods only) "
+   * @return a result object containing the results of the invocation
+   */
+  public static native MethodResult executeMethod (Object obj, Thread thread,
+					    Class clazz, Method method,
+					    Object[] values,
+					    boolean nonVirtual)
+    throws JdwpException;
+
+  /**
+   * "Returns the name of source file in which a reference type was declared"
+   *
+   * @param  clazz  the class for which to return a source file
+   * @return a string containing the source file name; "no path information
+   *         for the file is included"
+   */
+  public static native String getSourceFile (Class clazz)
+    throws JdwpException;
+
+  /**
+   * Register a request from the debugger
+   *
+   * Virtual machines have two options. Either do nothing and allow
+   * the event manager to take care of the request (useful for broadcast-type
+   * events like class prepare/load/unload, thread start/end, etc.)
+   * or do some internal work to set up the event notification (useful for
+   * execution-related events like breakpoints, single-stepping, etc.).
+   */
+  public static native void registerEvent (EventRequest request)
+    throws JdwpException;
+
+  /**
+   * Unregisters the given request
+   *
+   * @param  request  the request to unregister
+   */
+  public static native void unregisterEvent (EventRequest request)
+    throws JdwpException;
+
+
+  /**
+   * Clear all events of the given kind
+   *
+   * @param  kind  the type of events to clear
+   */
+  public static native void clearEvents (byte kind)
+    throws JdwpException;
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/natVMFrame.cc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/natVMFrame.cc?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/natVMFrame.cc (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/natVMFrame.cc Thu Nov  8 16:56:19 2007
@@ -0,0 +1,26 @@
+// natFrame.cc -- native support for VMFrame.java
+
+/* Copyright (C) 2006 Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+#include <gcj/cni.h>
+
+#include <gnu/classpath/jdwp/VMFrame.h>
+
+using namespace java::lang;
+
+Object*
+gnu::classpath::jdwp::VMFrame::getValue (jint slot)
+{
+  return 0;
+}
+
+void
+gnu::classpath::jdwp::VMFrame::setValue (jint slot, Object* value)
+{
+}

Added: llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/natVMMethod.cc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/natVMMethod.cc?rev=43913&view=auto

==============================================================================
--- llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/natVMMethod.cc (added)
+++ llvm-gcc-4.2/trunk/libjava/gnu/classpath/jdwp/natVMMethod.cc Thu Nov  8 16:56:19 2007
@@ -0,0 +1,47 @@
+// natVMMethod.cc -- native support for VMMethod
+
+/* Copyright (C) 2006 Free Software Foundation
+
+   This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
+details.  */
+
+#include <config.h>
+#include <gcj/cni.h>
+
+#include <gnu/classpath/jdwp/VMMethod.h>
+#include <gnu/classpath/jdwp/util/LineTable.h>
+#include <gnu/classpath/jdwp/util/VariableTable.h>
+
+java::lang::String*
+gnu::classpath::jdwp::VMMethod::getName ()
+{
+  return NULL;
+}
+
+java::lang::String*
+gnu::classpath::jdwp::VMMethod::getSignature ()
+{
+  return NULL;
+}
+
+jint
+gnu::classpath::jdwp::VMMethod::getModifiers ()
+{
+  return 0;
+}
+
+gnu::classpath::jdwp::util::LineTable*
+gnu::classpath::jdwp::VMMethod::getLineTable ()
+{
+  return NULL;
+}
+
+
+gnu::classpath::jdwp::util::VariableTable*
+gnu::classpath::jdwp::VMMethod::getVariableTable ()
+{
+  return NULL;
+}





More information about the llvm-commits mailing list