[llvm-commits] [vmkit] r52708 - in /vmkit/trunk: ./ autoconf/ include/mvm/Config/ lib/ lib/JnJVM/ lib/JnJVM/Classpath/ lib/JnJVM/LLVMRuntime/ lib/JnJVM/VMCore/ lib/Mvm/ lib/Mvm/Allocator/ lib/Mvm/BoehmGC/ lib/Mvm/CommonThread/ lib/Mvm/GCMmap2/ lib/N3/ lib/N3/VMCore/ patches/ tools/ tools/jnjvm/ tools/n3/ tools/testAllocator/ tools/testCollector/ tools/vtoffset/
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Wed Jun 25 02:59:51 PDT 2008
Author: geoffray
Date: Wed Jun 25 04:59:39 2008
New Revision: 52708
URL: http://llvm.org/viewvc/llvm-project?rev=52708&view=rev
Log:
Make vmkit use a llvm-project like build system. Now executables
are {Debug|Release}/bin/{jnjvm|n3}.
Added:
vmkit/trunk/CREDITS.TXT
vmkit/trunk/Makefile (with props)
vmkit/trunk/Makefile.common.in (with props)
vmkit/trunk/Makefile.config.in (with props)
vmkit/trunk/README.txt
vmkit/trunk/autoconf/
vmkit/trunk/autoconf/AutoRegen.sh (with props)
vmkit/trunk/autoconf/config.guess (with props)
vmkit/trunk/autoconf/config.sub (with props)
vmkit/trunk/autoconf/configure.ac
vmkit/trunk/autoconf/install-sh
vmkit/trunk/configure (with props)
vmkit/trunk/include/mvm/Config/
vmkit/trunk/include/mvm/Config/config.h.in
vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp.inc
vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp.inc
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp.inc
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClassLoader.cpp.inc
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp.inc
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMObject.cpp.inc
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp.inc
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp.inc
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp.inc
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystemProperties.cpp.inc
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp.inc
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp.inc
vmkit/trunk/lib/JnJVM/Classpath/Makefile
vmkit/trunk/lib/JnJVM/LLVMRuntime/Makefile
vmkit/trunk/lib/JnJVM/Makefile
vmkit/trunk/lib/JnJVM/README.txt
vmkit/trunk/lib/JnJVM/VMCore/Makefile
vmkit/trunk/lib/Main.cpp
vmkit/trunk/lib/Makefile (with props)
vmkit/trunk/lib/Mvm/Allocator/Makefile
vmkit/trunk/lib/Mvm/Allocator/README.txt
vmkit/trunk/lib/Mvm/BoehmGC/Makefile
vmkit/trunk/lib/Mvm/CommonThread/Makefile
vmkit/trunk/lib/Mvm/GCMmap2/Makefile
vmkit/trunk/lib/Mvm/Makefile
vmkit/trunk/lib/N3/Makefile
vmkit/trunk/lib/N3/README.txt
vmkit/trunk/lib/N3/VMCore/Makefile
vmkit/trunk/patches/
vmkit/trunk/patches/vmkit-llvm-ppc.patch
vmkit/trunk/patches/vmkit-llvm-x86.patch
vmkit/trunk/tools/
vmkit/trunk/tools/Makefile (with props)
vmkit/trunk/tools/jnjvm/
vmkit/trunk/tools/jnjvm/Makefile (with props)
vmkit/trunk/tools/n3/
vmkit/trunk/tools/n3/Makefile (with props)
vmkit/trunk/tools/testAllocator/
vmkit/trunk/tools/testAllocator/Main.cpp
vmkit/trunk/tools/testAllocator/Makefile
vmkit/trunk/tools/testCollector/
vmkit/trunk/tools/testCollector/Main.cpp
vmkit/trunk/tools/testCollector/Makefile (with props)
vmkit/trunk/tools/vtoffset/
vmkit/trunk/tools/vtoffset/Makefile
vmkit/trunk/tools/vtoffset/VTOffset.cpp
Removed:
vmkit/trunk/AUTHORS
vmkit/trunk/ChangeLog
vmkit/trunk/Makefile.am
vmkit/trunk/NEWS
vmkit/trunk/README
vmkit/trunk/autogen.sh
vmkit/trunk/configure.ac
vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp
vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClassLoader.cpp
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMObject.cpp
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystemProperties.cpp
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp
vmkit/trunk/lib/JnJVM/Classpath/Makefile.am
vmkit/trunk/lib/JnJVM/LLVMRuntime/Makefile.am
vmkit/trunk/lib/JnJVM/Main.cpp
vmkit/trunk/lib/JnJVM/Makefile.am
vmkit/trunk/lib/JnJVM/README
vmkit/trunk/lib/JnJVM/TODO
vmkit/trunk/lib/JnJVM/VMCore/Makefile.am
vmkit/trunk/lib/Mvm/Allocator/.cvsignore
vmkit/trunk/lib/Mvm/Allocator/Makefile.am
vmkit/trunk/lib/Mvm/Allocator/README
vmkit/trunk/lib/Mvm/Allocator/main.cpp
vmkit/trunk/lib/Mvm/BoehmGC/Makefile.am
vmkit/trunk/lib/Mvm/CommonThread/Makefile.am
vmkit/trunk/lib/Mvm/CommonThread/main.cpp
vmkit/trunk/lib/Mvm/GCMmap2/Makefile.am
vmkit/trunk/lib/Mvm/GCMmap2/main.cpp
vmkit/trunk/lib/Mvm/Main.cpp
vmkit/trunk/lib/Mvm/Makefile.am
vmkit/trunk/lib/Mvm/VTOffset.cpp
vmkit/trunk/lib/N3/Main.cpp
vmkit/trunk/lib/N3/Makefile.am
vmkit/trunk/lib/N3/README
vmkit/trunk/lib/N3/VMCore/Makefile.am
vmkit/trunk/lib/N3/pnet-0.7.4.patch
vmkit/trunk/vmkit-llvm-ppc.patch
vmkit/trunk/vmkit-llvm-x86.patch
Modified:
vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaArray.h
vmkit/trunk/lib/JnJVM/VMCore/JavaBacktrace.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp
vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp
vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp
vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp
vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h
vmkit/trunk/lib/JnJVM/VMCore/ServiceDomain.cpp
vmkit/trunk/lib/Mvm/GCMmap2/gccollector.h
vmkit/trunk/lib/N3/VMCore/Assembly.cpp
vmkit/trunk/lib/N3/VMCore/Assembly.h
vmkit/trunk/lib/N3/VMCore/BackTrace.cpp
vmkit/trunk/lib/N3/VMCore/CLIJit.cpp
vmkit/trunk/lib/N3/VMCore/LockedMap.h
vmkit/trunk/lib/N3/VMCore/PNetLib.cpp
vmkit/trunk/lib/N3/VMCore/VMArray.h
vmkit/trunk/lib/N3/VMCore/VirtualTables.cpp
Removed: vmkit/trunk/AUTHORS
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/AUTHORS?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/AUTHORS (original)
+++ vmkit/trunk/AUTHORS (removed)
@@ -1,29 +0,0 @@
-This file is a partial list of people who have contributed to the VMKit
-project. If you have contributed a patch or made some other contribution to
-VMKit, please submit a patch to this file to add yourself, and it will be
-done!
-
-The list is sorted by name and formatted to allow easy grepping and
-beautification by scripts. The fields are: name (N), email (E), web-address
-(W), PGP key ID and fingerprint (P), description (D), and snail-mail address
-(S).
-
-N: Bertil Folliot
-E: bertil.folliot at lip6.fr
-W: http://www-src.lip6.fr/homepages/Bertil.Folliot/
-D: Provider of much wisdom
-
-N: Nicolas Geoffray
-E: nicolas.geoffray at lip6.fr
-W: http://www-src.lip6.fr/homepages/Nicolas.Geoffray/
-D: Port of JnJVM to LLVM
-D: Architect of N3
-
-N: Sylvain Marechal
-E: sylvain.marechal at lip6.fr
-D: Original autoconf support
-
-N: Gael Thomas
-E: gael.thomas at lip6.fr
-W: http://www-src.lip6.fr/homepages/Gael.Thomas/
-D: Primary architect of JnJVM
Added: vmkit/trunk/CREDITS.TXT
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/CREDITS.TXT?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/CREDITS.TXT (added)
+++ vmkit/trunk/CREDITS.TXT Wed Jun 25 04:59:39 2008
@@ -0,0 +1,29 @@
+This file is a partial list of people who have contributed to the VMKit
+project. If you have contributed a patch or made some other contribution to
+VMKit, please submit a patch to this file to add yourself, and it will be
+done!
+
+The list is sorted by name and formatted to allow easy grepping and
+beautification by scripts. The fields are: name (N), email (E), web-address
+(W), PGP key ID and fingerprint (P), description (D), and snail-mail address
+(S).
+
+N: Bertil Folliot
+E: bertil.folliot at lip6.fr
+W: http://www-src.lip6.fr/homepages/Bertil.Folliot/
+D: Provider of much wisdom
+
+N: Nicolas Geoffray
+E: nicolas.geoffray at lip6.fr
+W: http://www-src.lip6.fr/homepages/Nicolas.Geoffray/
+D: Port of JnJVM to LLVM
+D: Architect of N3
+
+N: Sylvain Marechal
+E: sylvain.marechal at lip6.fr
+D: Original autoconf support
+
+N: Gael Thomas
+E: gael.thomas at lip6.fr
+W: http://www-src.lip6.fr/homepages/Gael.Thomas/
+D: Primary architect of JnJVM
Removed: vmkit/trunk/ChangeLog
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/ChangeLog?rev=52707&view=auto
==============================================================================
(empty)
Added: vmkit/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/Makefile (added)
+++ vmkit/trunk/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,26 @@
+#===- ./Makefile -------------------------------------------*- Makefile -*--===#
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+#===------------------------------------------------------------------------===#
+
+LEVEL := .
+
+# Top-Level vmkit Build Stages:
+#
+DIRS := lib tools
+EXTRA_DIST=include
+
+include $(LEVEL)/Makefile.common
+
+#------------------------------------------------------------------------
+# Make sure the generated headers are up-to-date. This must be kept in
+# sync with the AC_CONFIG_HEADER invocations in autoconf/configure.ac
+#------------------------------------------------------------------------
+FilesToConfig := \
+ include/llvm/Config/config.h \
+ lib/JnJVM/Classpath/Classpath.h \
+FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
Propchange: vmkit/trunk/Makefile
------------------------------------------------------------------------------
svn:executable = *
Removed: vmkit/trunk/Makefile.am
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.am?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/Makefile.am (original)
+++ vmkit/trunk/Makefile.am (removed)
@@ -1,9 +0,0 @@
-SUBDIRS = lib/Mvm lib/JnJVM
-DIST_SUBDIRS = lib/Mvm lib/JnJVM
-
-if WITH_N3
-SUBDIRS += lib/N3
-DIST_SUBDIRS += lib/N3
-endif
-
-EXTRA_DIST =
Added: vmkit/trunk/Makefile.common.in
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.common.in?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/Makefile.common.in (added)
+++ vmkit/trunk/Makefile.common.in Wed Jun 25 04:59:39 2008
@@ -0,0 +1,44 @@
+# Set the name of the project here
+PROJECT_NAME := vmkit
+PROJ_VERSION := 0.1
+
+# Set this variable to the top of the LLVM source tree.
+LLVM_SRC_ROOT = @LLVM_SRC@
+
+# Set this variable to the top level directory where LLVM was built
+# (this is *not* the same as OBJ_ROOT as defined in LLVM's Makefile.config).
+LLVM_OBJ_ROOT = @LLVM_OBJ@
+
+# Set the directory root of this project's source files
+PROJ_SRC_ROOT := $(subst //,/, at abs_top_srcdir@)
+
+# Set the root directory of this project's object files
+PROJ_OBJ_ROOT := $(subst //,/, at abs_top_objdir@)
+
+# Set the root directory of this project's install prefix
+PROJ_INSTALL_ROOT := @prefix@
+
+REQUIRES_EH := 1
+
+# Include LLVM's Master Makefile.
+include $(LLVM_OBJ_ROOT)/Makefile.common
+
+CXX.Flags += @GC_FLAGS@ -Wno-variadic-macros -fno-omit-frame-pointer
+
+# GNU Classpath flags
+CLASSPATH_FLAGS = -I at classpathinclude@
+
+# Pnet location
+PNETLIB = @pnetlocalprefix@
+
+# GC configuration
+LIBS += -lz
+GCLIB = @GC_LIBS@
+GC_MULTI_MMAP = @GC_MULTI_MMAP@
+GC_SINGLE_MMAP = @GC_SINGLE_MMAP@
+GC_BOEHM = @GC_BOEHM@
+GC_MMAP2 = @GC_MMAP2@
+
+ifeq ($(GCLIB), BoehmGC)
+ LIBS += -lgc
+endif
Propchange: vmkit/trunk/Makefile.common.in
------------------------------------------------------------------------------
svn:executable = *
Added: vmkit/trunk/Makefile.config.in
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.config.in?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/Makefile.config.in (added)
+++ vmkit/trunk/Makefile.config.in Wed Jun 25 04:59:39 2008
@@ -0,0 +1 @@
+GCLIB = @GC_LIBS@
Propchange: vmkit/trunk/Makefile.config.in
------------------------------------------------------------------------------
svn:executable = *
Removed: vmkit/trunk/NEWS
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/NEWS?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/NEWS (original)
+++ vmkit/trunk/NEWS (removed)
@@ -1,7 +0,0 @@
-(April 11, 2008)
-* Interface with boehm-gc
-
-(March 21, 2008)
-
-* VMKit goes public!
-* Usage of the University of Illinois Open source License
Removed: vmkit/trunk/README
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/README?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/README (original)
+++ vmkit/trunk/README (removed)
@@ -1,72 +0,0 @@
-//===---------------------------------------------------------------------===//
-// General notes
-//===---------------------------------------------------------------------===//
-
-VMKit is the composition of three libraries:
-1) MVM: mostly a garbage collector
-2) JnJVM: a Java Virtual Machine implemented with MVM and LLVM
-3) N3: a CLI implementation with MVM and LLVM
-
-JnJVM and N3 work on Linux/x86 (note that you may have to disable SSE on some
-architecture), and mostly work on Linux/PPC (there are some errors with
-floating points). Portage to Darwin has been done some time ago, so it should
-not be too hard.
-
-JnJVM and N3 use GCC's unwinding library (libgcc_s.so).
-
-There are mainly two options in the ./configure script
---with-gnu-classpath-local-prefix: the local build of GNU classpath
---with-pnet-local-prefix: the local build of PNET
---with-llvm: the local build of LLVM
---with-gc: user either boehm or single-mmap
-
-Running make on the root tree will produce three executables:
-1) lib/Mvm/main: a command line tool to load virtual machines dynamically
-2) lib/JnJVM/main: running the JnJVM like any other JVM
-3) lib/N3/main: running N3 like CLR
-
-JnJVM and N3 have their own README notes.
-
-
-//===---------------------------------------------------------------------===//
-// Target specific LLVM patches (not required)
-//===---------------------------------------------------------------------===//
-
-If you experience problems, you can apply the patches for your corresponding
-arch. I'd be interested to get some info on your specific problem if the
-patch fixes it.
-
-Patch for PowerPC:
-- Bugfix for handling some external symbols (FIXME: does this still happen?)
-- Thread safety when doing native code patching (TODO: submit to llvm-dev)
-- CFI instructions for callbacks (TODO: find a correct macro to enable this)
-- Emit a hand-made frame table for stubs (TODO: submit to llvm-dev)
-
-Patch for X86
-- Disable SSE (It can sigsegv on some x86 archs. Having test cases would be
- nice)
-- Enable CFI instructions for callbacks (TODO: find a correct macro to enable
- by default)
-
-
-//===---------------------------------------------------------------------===//
-// TODOs
-//===---------------------------------------------------------------------===//
-
-- A compiler/system dependency interface
-- A better autoconf support
-- Remove old, historical references and files
-- Currently old object are allocated by MVM'GC. Make some classes
- hand-allocated.
-- Port to Darwin
-- Improve exception handling performance: it's currently ugly and inefficient
-
-//===---------------------------------------------------------------------===//
-// Disclaimer
-//===---------------------------------------------------------------------===//
-
-JnJVM, N3 and MVM were developed with "having functional virtual machines as
-quick as possible" in mind. The usage of mixed C/C++ and the absence of clean
-interfaces, is due to the initial developers lazyness. But now that the VMs
-run, things should go better.
-
Added: vmkit/trunk/README.txt
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/README.txt?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/README.txt (added)
+++ vmkit/trunk/README.txt Wed Jun 25 04:59:39 2008
@@ -0,0 +1,56 @@
+//===---------------------------------------------------------------------===//
+// General notes
+//===---------------------------------------------------------------------===//
+
+VMKit is the composition of three libraries:
+1) MVM: mostly a garbage collector
+2) JnJVM: a Java Virtual Machine implemented with MVM and LLVM
+3) N3: a CLI implementation with MVM and LLVM
+
+JnJVM and N3 work on Linux/x86 (note that you may have to disable SSE on some
+architecture), and mostly work on Linux/PPC (there are some errors with
+floating points). Portage to Darwin needs to investigate why exceptions
+do not work.
+
+JnJVM and N3 use GCC's unwinding library (libgcc_s.so).
+
+There are mainly two options in the ./configure script
+--with-gnu-classpath-local-prefix: the local build of GNU classpath
+--with-pnet-local-prefix: the local build of PNET
+--with-llvmsrc: the local build of LLVM
+--with-gc: user either boehm or single-mmap
+
+Running make on the root tree will produce two "tools":
+1) Debug|Release/bin/jnjvm: running the JnJVM like any other JVM
+2) Debug|Release/bin/n3: running N3 like CLR
+
+JnJVM and N3 have their own README notes.
+
+
+//===---------------------------------------------------------------------===//
+// Target specific LLVM patches (not required)
+//===---------------------------------------------------------------------===//
+
+If you experience problems, you can apply the patches for your corresponding
+arch. I'd be interested to get some info on your specific problem if the
+patch fixes it.
+
+Patch for PowerPC:
+- Bugfix for handling some external symbols (FIXME: does this still happen?)
+- Thread safety when doing native code patching (TODO: submit to llvm-dev)
+- CFI instructions for callbacks (TODO: find a correct macro to enable this)
+- Emit a hand-made frame table for stubs (TODO: submit to llvm-dev)
+
+Patch for X86
+- Disable SSE (It can sigsegv on some x86 archs. Having test cases would be
+ nice)
+- Enable CFI instructions for callbacks (TODO: find a correct macro to enable
+ by default)
+
+
+//===---------------------------------------------------------------------===//
+// TODOs
+//===---------------------------------------------------------------------===//
+
+- A compiler/system dependency interface
+- Port to Darwin
Added: vmkit/trunk/autoconf/AutoRegen.sh
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/autoconf/AutoRegen.sh?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/autoconf/AutoRegen.sh (added)
+++ vmkit/trunk/autoconf/AutoRegen.sh Wed Jun 25 04:59:39 2008
@@ -0,0 +1,52 @@
+#!/bin/sh
+die () {
+ echo "$@" 1>&2
+ exit 1
+}
+test -d autoconf && test -f autoconf/configure.ac && cd autoconf
+test -f configure.ac || die "Can't find 'autoconf' dir; please cd into it first"
+autoconf --version | egrep '2\.[5-6][0-9]' > /dev/null
+if test $? -ne 0 ; then
+ die "Your autoconf was not detected as being 2.5x or 2.6x"
+fi
+cwd=`pwd`
+if test -d ../../../autoconf/m4 ; then
+ cd ../../../autoconf/m4
+ llvm_m4=`pwd`
+ llvm_src_root=../../..
+ llvm_obj_root=../../..
+ cd $cwd
+elif test -d ../../llvm/autoconf/m4 ; then
+ cd ../../llvm/autoconf/m4
+ llvm_m4=`pwd`
+ llvm_src_root=../..
+ llvm_obj_root=../..
+ cd $cwd
+else
+ while true ; do
+ echo "LLVM source root not found."
+ read -p "Enter full path to LLVM source:"
+ if test -d "$REPLY/autoconf/m4" ; then
+ llvm_src_root="$REPLY"
+ llvm_m4="$REPLY/autoconf/m4"
+ read -p "Enter full path to LLVM objects (empty for same as source):"
+ if test -d "$REPLY" ; then
+ llvm_obj_root="$REPLY"
+ else
+ llvm_obj_root="$llvm_src_root"
+ fi
+ break
+ fi
+ done
+fi
+# Patch the LLVM_ROOT in configure.ac, if it needs it
+cp configure.ac configure.bak
+sed -e "s#^LLVM_SRC_ROOT=.*#LLVM_SRC_ROOT=\"$llvm_src_root\"#" \
+ -e "s#^LLVM_OBJ_ROOT=.*#LLVM_OBJ_ROOT=\"$llvm_obj_root\"#" configure.bak > configure.ac
+echo "Regenerating aclocal.m4 with aclocal"
+rm -f aclocal.m4
+aclocal -I $llvm_m4 -I "$llvm_m4/.." || die "aclocal failed"
+echo "Regenerating configure with autoconf 2.5x or 2.6x"
+autoconf --warnings=all -o ../configure configure.ac || die "autoconf failed"
+cd ..
+exit 0
Propchange: vmkit/trunk/autoconf/AutoRegen.sh
------------------------------------------------------------------------------
svn:executable = *
Added: vmkit/trunk/autoconf/config.guess
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/autoconf/config.guess?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/autoconf/config.guess (added)
+++ vmkit/trunk/autoconf/config.guess Wed Jun 25 04:59:39 2008
@@ -0,0 +1,1447 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+timestamp='2004-09-07'
+
+# This file 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 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Per Bothner <per at bothner.com>.
+# Please send patches to <config-patches at gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit 0 ;;
+ amd64:OpenBSD:*:*)
+ echo x86_64-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ cats:OpenBSD:*:*)
+ echo arm-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ luna88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvmeppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mips64-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:MirBSD:*:*)
+ echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit 0 ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit 0;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit 0 ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit 0 ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit 0;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit 0 ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit 0 ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit 0 ;;
+ DRS?6000:UNIX_SV:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7 && exit 0 ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit 0 ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit 0 ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c \
+ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && exit 0
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit 0 ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit 0 ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit 0 ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+ echo rs6000-ibm-aix3.2.5
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit 0 ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ # avoid double evaluation of $set_cc_for_build
+ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit 0 ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit 0 ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit 0 ;;
+ x86:Interix*:[34]*)
+ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+ exit 0 ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit 0 ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit 0 ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit 0 ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit 0 ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit 0 ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit 0 ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit 0 ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit 0 ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit 0 ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit 0 ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit 0 ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit 0 ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit 0 ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit 0 ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit 0 ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit 0 ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit 0 ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #ifdef __INTEL_COMPILER
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit 0 ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit 0 ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit 0 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit 0 ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit 0 ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit 0 ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit 0 ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit 0 ;;
+ i*86:*:5:[78]*)
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit 0 ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit 0 ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit 0 ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit 0 ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit 0 ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit 0 ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel at ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit 0 ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes at openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit 0 ;;
+ *:*:*:FTX*)
+ # From seanf at swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit 0 ;;
+ *:VOS:*:*)
+ # From Paul.Green at stratus.com.
+ echo hppa1.1-stratus-vos
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit 0 ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ *86) UNAME_PROCESSOR=i686 ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit 0 ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit 0 ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit 0 ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit 0 ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit 0 ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit 0 ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit 0 ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit 0 ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit 0 ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit 0 ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit 0 ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit 0 ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit 0 ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit 0 ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit 0 ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms && exit 0 ;;
+ I*) echo ia64-dec-vms && exit 0 ;;
+ V*) echo vax-dec-vms && exit 0 ;;
+ esac
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+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`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
Propchange: vmkit/trunk/autoconf/config.guess
------------------------------------------------------------------------------
svn:executable = *
Added: vmkit/trunk/autoconf/config.sub
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/autoconf/config.sub?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/autoconf/config.sub (added)
+++ vmkit/trunk/autoconf/config.sub Wed Jun 25 04:59:39 2008
@@ -0,0 +1,1555 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+timestamp='2004-08-29'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file 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 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to <config-patches at gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit 0;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | m32r | m32rle | m68000 | m68k | m88k | mcore \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | msp430 \
+ | ns16k | ns32k \
+ | openrisc | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
+ | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xscale | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* \
+ | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | mcore-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | msp430-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+ | xtensa-* \
+ | ymp-* \
+ | z8k-*)
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16c)
+ basic_machine=cr16c-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ or32 | or32-*)
+ basic_machine=or32-unknown
+ os=-coff
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
Propchange: vmkit/trunk/autoconf/config.sub
------------------------------------------------------------------------------
svn:executable = *
Added: vmkit/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/autoconf/configure.ac?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/autoconf/configure.ac (added)
+++ vmkit/trunk/autoconf/configure.ac Wed Jun 25 04:59:39 2008
@@ -0,0 +1,486 @@
+dnl === configure.ac --------------------------------------------------------===
+dnl The vmkit project
+dnl
+dnl This file is distributed under the University of Illinois Open Source
+dnl License. See LICENSE.TXT for details.
+dnl
+dnl===-----------------------------------------------------------------------===
+dnl This is the VMKit configuration script. It is processed by the autoconf
+dnl program to produce a script named configure. This script contains the
+dnl configuration checks that VMKit needs in order to support multiple platforms.
+dnl This file is composed of 10 sections per the recommended organization of
+dnl autoconf input defined in the autoconf documentation. As this file evolves,
+dnl please keep the various types of checks within their sections. The sections
+dnl are as follows:
+dnl
+dnl SECTION 1: Initialization & Setup
+dnl SECTION 2: Architecture, target, and host checks
+dnl SECTION 3: Command line arguments for the configure script.
+dnl SECTION 4: Check for programs we need and that they are the right version
+dnl SECTION 5: Check for libraries
+dnl SECTION 6: Check for header files
+dnl SECTION 7: Check for types and structures
+dnl SECTION 8: Check for specific functions needed
+dnl SECTION 9: Additional checks, variables, etc.
+dnl SECTION 10: Specify the output files and generate it
+dnl
+dnl===-----------------------------------------------------------------------===
+dnl===
+dnl=== SECTION 1: Initialization & Setup
+dnl===
+dnl===-----------------------------------------------------------------------===
+dnl Initialize autoconf and define the package name, version number and
+dnl email address for reporting bugs.
+AC_INIT([vmkit],[0.0.1],[nicolas.geoffray at lip6.fr])
+
+dnl Provide a copyright substitution and ensure the copyright notice is included
+dnl in the output of --version option of the generated configure script.
+AC_SUBST(VMKIT_COPYRIGHT,["Copyright (c) 2003-2008 Universite Pierre et Marie Curie."])
+AC_COPYRIGHT([Copyright (c) 2003-2008 Universite Pierre et Marie Curie.])
+
+dnl Indicate that we require autoconf 2.59 or later. Ths is needed because we
+dnl use some autoconf macros only available in 2.59.
+AC_PREREQ(2.59)
+
+dnl Verify that the source directory is valid. This makes sure that we are
+dnl configuring VMKit and not some other package (it validates --srcdir argument)
+AC_CONFIG_SRCDIR([lib/Mvm/Object.cpp])
+
+
+dnl Quit if the source directory has already been configured.
+dnl NOTE: This relies upon undocumented autoconf behavior.
+if test ${srcdir} != "." ; then
+ if test -f ${srcdir}/include/mvm/Config/config.h ; then
+ AC_MSG_ERROR([Already configured in ${srcdir}])
+ fi
+fi
+
+dnl Place all of the extra autoconf files into the config subdirectory. Tell
+dnl various tools where the m4 autoconf macros are.
+AC_CONFIG_AUX_DIR([$LLVM_SRC_ROOT/autoconf])
+
+dnl Tell autoconf that this is an LLVM project being configured
+dnl This provides the --with-llvmsrc and --with-llvmobj options
+LLVM_CONFIG_PROJECT($LLVM_SRC_ROOT,$LLVM_OBJ_ROOT)
+
+
+dnl===-----------------------------------------------------------------------===
+dnl===
+dnl=== SECTION 2: Architecture, target, and host checks
+dnl===
+dnl===-----------------------------------------------------------------------===
+
+dnl Check the target for which we're compiling and the host that will do the
+dnl compilations. This will tell us which LLVM compiler will be used for
+dnl compiling SSA into object code. This needs to be done early because
+dnl following tests depend on it.
+AC_CANONICAL_TARGET
+
+dnl Determine the platform type and cache its value. This helps us configure
+dnl the System library to the correct build platform.
+AC_CACHE_CHECK([type of operating system we're going to host on],
+ [vmkit_cv_os_type],
+[case $host in
+ *-*-aix*)
+ AC_MSG_ERROR([Good luck porting vmkit to your host!])
+ vmkit_cv_os_type="AIX"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-irix*)
+ AC_MSG_ERROR([Good luck porting vmkit to your host!])
+ vmkit_cv_os_type="IRIX"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-cygwin*)
+ AC_MSG_ERROR([Good luck porting vmkit to your host!])
+ vmkit_cv_os_type="Cygwin"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-darwin*)
+ DYLIB_EXTENSION="dylib"
+ vmkit_cv_os_type="Darwin"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-freebsd*)
+ AC_MSG_ERROR([Good luck porting vmkit to your host!])
+ vmkit_cv_os_type="FreeBSD"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-openbsd*)
+ AC_MSG_ERROR([Good luck porting vmkit to your host!])
+ vmkit_cv_os_type="OpenBSD"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-netbsd*)
+ AC_MSG_ERROR([Good luck porting vmkit to your host!])
+ vmkit_cv_os_type="NetBSD"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-hpux*)
+ AC_MSG_ERROR([Good luck porting vmkit to your host!])
+ vmkit_cv_os_type="HP-UX"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-interix*)
+ AC_MSG_ERROR([Good luck porting vmkit to your host!])
+ vmkit_cv_os_type="Interix"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-linux*)
+ DYLIB_EXTENSION="so"
+ vmkit_cv_os_type="Linux"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-solaris*)
+ AC_MSG_ERROR([Good luck porting vmkit to your host!])
+ vmkit_cv_os_type="SunOS"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-win32*)
+ AC_MSG_ERROR([Good luck porting vmkit to your host!])
+ vmkit_cv_os_type="Win32"
+ vmkit_cv_platform_type="Win32" ;;
+ *-*-mingw*)
+ AC_MSG_ERROR([Good luck porting vmkit to your host!])
+ vmkit_cv_os_type="MingW"
+ vmkit_cv_platform_type="Win32" ;;
+ *)
+ AC_MSG_ERROR([Good luck porting vmkit to your host!])
+ vmkit_cv_os_type="Unknown"
+ vmkit_cv_platform_type="Unknown" ;;
+esac])
+
+dnl Make sure we aren't attempting to configure for an unknown system
+
+AC_SUBST([DYLIB_EXTENSION])
+
+dnl===-----------------------------------------------------------------------===
+dnl===
+dnl=== SECTION 3: Command line arguments for the configure script.
+dnl===
+dnl===-----------------------------------------------------------------------===
+
+AC_ARG_WITH(thread,
+ [AS_HELP_STRING(--with-thread=something,
+ [Thread type ('common' or 'no')])],
+ [thread=$withval],[thread=common]
+)
+
+AS_IF([test "x$thread" != "xno"],
+ [AC_CHECK_HEADER([pthread.h],,
+ [AC_MSG_WARN(phtread include NOT found)])
+ AC_CHECK_LIB(pthread, pthread_create, [],
+ [AC_MSG_ERROR([pthread library not found])])
+ ]
+)
+
+if test "x$thread" = xcommon; then
+ AC_DEFINE([HAVE_PTHREAD], [1], [Using pthread library])
+fi
+
+dnl **************************************************************************
+dnl VVM GC type
+dnl **************************************************************************
+AC_ARG_WITH(gc,
+ [AS_HELP_STRING(--with-gc=something,
+ [GC type ('single-mmap' 'multi-mmap' or 'boehm')])],
+ [[gc=$withval]],
+ [[ echo Using mmap2 as vvm gc type.
+ gc=single-mmap
+ ]]
+)
+
+if test "x$gc" = "xboehm"; then
+ GC_FLAGS ="-I$PWD/lib/Mvm/BoehmGC -DGC_THREADS"
+ AC_DEFINE([USE_GC_BOEHM], [1], [Using the boehm gc])
+ AC_SUBST(GC_MMAP2, [0])
+ AC_SUBST(GC_BOEHM, [1])
+ GC_LIBS=BoehmGC
+ case $target_os in
+ *linux*)
+ GC_FLAGS="-I$PWD/lib/Mvm/BoehmGC -DGC_THREADS -DGC_LINUX_THREADS"
+ ;;
+ esac
+else
+ GC_LIBS=GCMmap2
+ if test "x$gc" = "xmulti-mmap"; then
+ GC_FLAGS="-I$PWD/lib/Mvm/GCMmap2 -DWITH_TRACER -DMULTIPLE_GC"
+ AC_SUBST([GC_MULTI_MMAP], [1])
+ AC_SUBST([GC_SINGLE_MMAP], [0])
+ else
+ GC_FLAGS="-I$PWD/lib/Mvm/GCMmap2 -DWITH_TRACER"
+ AC_SUBST([GC_MULTI_MMAP], [0])
+ AC_SUBST([GC_SINGLE_MMAP], [1])
+ fi
+ AC_DEFINE([USE_GC_MMAP2], [1], [Using the gcmmap2])
+ AC_SUBST(GC_MMAP2, [1])
+ AC_SUBST(GC_BOEHM, [0])
+fi
+
+AC_SUBST([GC_FLAGS])
+AC_SUBST([GC_LIBS])
+
+dnl **************************************************************************
+dnl Virtual Machine type
+dnl **************************************************************************
+AC_ARG_WITH(vm-type,
+ [AS_HELP_STRING(--with-vm-type=something,
+ [VM type ('single' 'multi' or 'service')])],
+ [[vmtype=$withval]],
+ [[ echo Using single as vm type.
+ vmtype=single
+ ]]
+)
+
+if test "x$vmtype" = "xmulti"; then
+ CFLAGS="$CFLAGS -DMULTIPLE_VM"
+ CXXFLAGS="$CXXFLAGS -DMULTIPLE_VM"
+else
+ if test "x$vmtype" = "xservice"; then
+ CFLAGS="$CFLAGS -DMULTIPLE_VM -DSERVICE_GC -DMULTIPLE_GC -DSERVICE_VM -I$PWD/lib/Mvm/Allocator"
+ CXXFLAGS="$CXXFLAGS -DMULTIPLE_VM -DSERVICE_GC -DMULTIPLE_GC -DSERVICE_VM -I$PWD/lib/Mvm/Allocator"
+ fi
+fi
+
+AM_CONDITIONAL([SERVICE_BUILD], [test "x$vmtype" = "xservice"])
+AM_CONDITIONAL([ISOLATE_BUILD], [test "x$vmtype" = "xmulti"])
+
+dnl **************************************************************************
+dnl GNU CLASSPATH installation prefix
+dnl **************************************************************************
+
+gnuclasspathversion=0.93;
+
+AC_ARG_WITH(gnu-classpath-local-prefix,
+ [AS_HELP_STRING(--with-gnu-classpath-local-prefix=something,
+ [GNU CLASSPATH local prefix (no default)])],
+ [[gnuclasspathlocalprefix=$withval]],
+ [[ echo Not using GNU CLASSPATH local prefix.
+ gnuclasspathlocalprefix=''
+ ]]
+)
+
+AC_ARG_WITH(gnu-classpath-installation-prefix,
+ [AS_HELP_STRING(--with-gnu-classpath-installation-prefix=something,
+ [GNU CLASSPATH installation prefix (default is '/usr/local/classpath')])],
+ [[gnuclasspathinstallationprefix=$withval]],
+ [[gnuclasspathinstallationprefix=/usr/local/classpath]]
+)
+
+if test "x${gnuclasspathlocalprefix}" = x; then
+ echo Using ${gnuclasspathinstallationprefix} as GNU CLASSPATH installation prefix;
+ classpathglibj=${gnuclasspathinstallationprefix}/share/classpath/glibj.zip;
+ classpathlibs=${gnuclasspathinstallationprefix}/lib/classpath/;
+ classpathinclude=${gnuclasspathlocalprefix}/include;
+else
+ echo Using ${gnuclasspathlocalprefix} as GNU CLASSPATH local prefix;
+ classpathglibj=${gnuclasspathlocalprefix}/lib/;
+ classpathlibs=${gnuclasspathlocalprefix}/lib/;
+ classpathinclude=${gnuclasspathlocalprefix}/include;
+fi
+
+
+AC_SUBST([classpathglibj])
+AC_SUBST([classpathlibs])
+AC_SUBST([classpathinclude])
+AC_SUBST([gnuclasspathversion])
+
+dnl **************************************************************************
+dnl Local PNet directory
+dnl **************************************************************************
+AC_ARG_WITH(pnet-local-prefix,
+ [AS_HELP_STRING(--with-pnet-local-prefix=something,
+ [PNET local prefix (no default)])],
+ [[pnetlocalprefix=$withval]],
+ [[ echo Not using PNETlocal prefix.
+ pnetlocalprefix=''
+ ]]
+)
+
+AM_CONDITIONAL([WITH_N3], [test "x$pnetlocalprefix" != "x"])
+if test "x$pnetlocalprefix" != x; then
+ echo Using ${pnetlocalprefix} as PNET local prefix;
+ AC_DEFINE([WITH_N3], [1], [Compiling N3])
+fi
+
+AC_SUBST([pnetlocalprefix])
+
+dnl===-----------------------------------------------------------------------===
+dnl===
+dnl=== SECTION 4: Check for programs we need and that they are the right version
+dnl===
+dnl===-----------------------------------------------------------------------===
+
+dnl Check for compilation tools
+AC_PROG_CPP
+AC_PROG_CC(gcc)
+AC_PROG_CXX(g++)
+
+AC_PROG_NM
+AC_SUBST(NM)
+
+dnl Check for the tools that the makefiles require
+AC_PROG_LN_S
+AC_PATH_PROG(CMP, [cmp], [cmp])
+AC_PATH_PROG(CP, [cp], [cp])
+AC_PATH_PROG(DATE, [date], [date])
+AC_PATH_PROG(FIND, [find], [find])
+AC_PATH_PROG(GREP, [grep], [grep])
+AC_PATH_PROG(MKDIR,[mkdir],[mkdir])
+AC_PATH_PROG(MV, [mv], [mv])
+AC_PROG_RANLIB
+AC_PATH_PROG(RM, [rm], [rm])
+AC_PATH_PROG(SED, [sed], [sed])
+AC_PATH_PROG(TAR, [tar], [gtar])
+AC_PATH_PROG(BINPWD,[pwd], [pwd])
+AC_PATH_PROG(CAT,[cat], [cat])
+
+AC_PATH_PROG(LLVMAS,[llvm-as], [llvm-as])
+AC_PATH_PROG(LLC,[llc], [llc])
+
+dnl Find the install program
+AC_PROG_INSTALL
+
+if test "$WITH_LLVMGCCDIR" = "default" ; then
+ LLVMGCC="llvm-gcc${EXEEXT}"
+ LLVMGXX="llvm-g++${EXEEXT}"
+ AC_PATH_PROG(LLVMGCC, $LLVMGCC, [])
+ AC_PATH_PROG(LLVMGXX, $LLVMGXX, [])
+else
+ if test -z "$LLVMGCC"; then
+ LLVMGCC="$WITH_LLVMGCCDIR/bin/llvm-gcc${EXEEXT}"
+ fi
+ if test -z "$LLVMGXX"; then
+ LLVMGXX="$WITH_LLVMGCCDIR/bin/llvm-g++${EXEEXT}"
+ fi
+ AC_SUBST(LLVMGCC,$LLVMGCC)
+ AC_SUBST(LLVMGXX,$LLVMGXX)
+fi
+
+AC_MSG_CHECKING([tool compatibility])
+
+dnl Ensure that compilation tools are GCC or a GNU compatible compiler such as
+dnl ICC; we use GCC specific options in the makefiles so the compiler needs
+dnl to support those options.
+dnl "icc" emits gcc signatures
+dnl "icc -no-gcc" emits no gcc signature BUT is still compatible
+ICC=no
+IXX=no
+case $CC in
+ icc*|icpc*)
+ ICC=yes
+ IXX=yes
+ ;;
+ *)
+ ;;
+esac
+
+if test "$GCC" != "yes" && test "$ICC" != "yes"
+then
+ AC_MSG_ERROR([gcc|icc required but not found])
+fi
+
+dnl Ensure that compilation tools are GCC; we use GCC specific extensions
+if test "$GXX" != "yes" && test "$IXX" != "yes"
+then
+ AC_MSG_ERROR([g++|icc required but not found])
+fi
+
+dnl Verify that GCC is version 3.0 or higher
+if test "$GCC" = "yes"
+then
+ AC_COMPILE_IFELSE([[#if !defined(__GNUC__) || __GNUC__ < 3
+#error Unsupported GCC version
+#endif
+]], [], [AC_MSG_ERROR([gcc 3.x required, but you have a lower version])])
+fi
+
+dnl Tool compatibility is okay if we make it here.
+AC_MSG_RESULT([ok])
+
+
+dnl===-----------------------------------------------------------------------===
+dnl===
+dnl=== SECTION 5: Check for libraries
+dnl===
+dnl===-----------------------------------------------------------------------===
+
+AC_CHECK_LIB(z, inflate, [], \
+ [AC_MSG_ERROR([You need to install the zlib package (z).])]
+)
+
+if test "x$gc" = "xboehm"; then
+AC_CHECK_LIB(gc, GC_malloc, [], \
+ [AC_MSG_ERROR([You need to install the boehm-gc package (gc).])]
+)
+fi
+
+dnl===-----------------------------------------------------------------------===
+dnl===
+dnl=== SECTION 6: Check for header files
+dnl===
+dnl===-----------------------------------------------------------------------===
+
+AC_CHECK_HEADER([zlib.h], [], \
+ AC_MSG_ERROR([You need to install the zlib devel package (zlib.h).])
+)
+
+if test "x$gc" = "xboehm"; then
+ AC_CHECK_HEADER([gc/gc.h], [], \
+ AC_MSG_ERROR([You need to install the boehm-gc devel package (gc/gc.h).])
+ )
+fi
+
+
+nl===-----------------------------------------------------------------------===
+dnl===
+dnl=== SECTION 7: Check for types and structures
+dnl===
+dnl===-----------------------------------------------------------------------===
+
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_TYPE_SIGNAL
+AC_STRUCT_TM
+AC_CHECK_TYPES([int64_t],,AC_MSG_ERROR([Type int64_t required but not found]))
+AC_CHECK_TYPES([uint64_t],,
+ AC_CHECK_TYPES([u_int64_t],,
+ AC_MSG_ERROR([Type uint64_t or u_int64_t required but not found])))
+
+dnl===-----------------------------------------------------------------------===
+dnl===
+dnl=== SECTION 8: Check for specific functions needed
+dnl===
+dnl===-----------------------------------------------------------------------===
+
+AC_CHECK_FUNCS([setjmp longjmp])
+
+
+dnl===-----------------------------------------------------------------------===
+dnl===
+dnl=== SECTION 9: Additional checks, variables, etc.
+dnl===
+dnl===-----------------------------------------------------------------------===
+
+dnl===-----------------------------------------------------------------------===
+dnl===
+dnl=== SECTION 10: Specify the output files and generate it
+dnl===
+dnl===-----------------------------------------------------------------------===
+
+dnl Configure header files
+dnl WARNING: dnl If you add or remove any of the following config headers, then
+dnl you MUST also update Makefile.rules so that the variable FilesToConfig
+dnl contains the same list of files as AC_CONFIG_HEADERS below. This ensures the
+dnl files can be updated automatically when their *.in sources change.
+AC_CONFIG_HEADERS([include/mvm/Config/config.h])
+
+dnl Verify that the source directory is valid
+AC_CONFIG_SRCDIR(["Makefile.common.in"])
+
+dnl Configure a common Makefile
+AC_CONFIG_FILES(Makefile.common)
+AC_CONFIG_FILES(Makefile.config)
+AC_CONFIG_FILES([lib/JnJVM/Classpath/Classpath.h])
+
+dnl Do special configuration of Makefiles
+AC_CONFIG_MAKEFILE(Makefile)
+AC_CONFIG_MAKEFILE(lib/Makefile)
+
+
+dnl **************************************************************************
+dnl LLVM Installation Prefix
+dnl **************************************************************************
+dnl LLVMDYLIB="`$llvmprefix/Release/bin/llvm-config --ldflags all` `$llvmprefix/Release/bin/llvm-config --libs all`"
+dnl AC_SUBST([LLVMDYLIB])
+
+AC_OUTPUT
Added: vmkit/trunk/autoconf/install-sh
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/autoconf/install-sh?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/autoconf/install-sh (added)
+++ vmkit/trunk/autoconf/install-sh Wed Jun 25 04:59:39 2008
@@ -0,0 +1,322 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2004-09-10.20
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+chmodcmd="$chmodprog 0755"
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c (ignored)
+-d create directories instead of installing files.
+-g GROUP $chgrpprog installed files to GROUP.
+-m MODE $chmodprog installed files to MODE.
+-o USER $chownprog installed files to USER.
+-s $stripprog installed files.
+-t DIRECTORY install into DIRECTORY.
+-T report an error if DSTFILE is a directory.
+--help display this help and exit.
+--version display version info and exit.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+ case $1 in
+ -c) shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ --help) echo "$usage"; exit 0;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+ -t) dstarg=$2
+ shift
+ shift
+ continue;;
+
+ -T) no_target_directory=true
+ shift
+ continue;;
+
+ --version) echo "$0 $scriptversion"; exit 0;;
+
+ *) # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ test -n "$dir_arg$dstarg" && break
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+ break;;
+ esac
+done
+
+if test -z "$1"; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src ;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ src=
+
+ if test -d "$dst"; then
+ mkdircmd=:
+ chmodcmd=
+ else
+ mkdircmd=$mkdirprog
+ fi
+ else
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dstarg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dstarg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst ;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dstarg: Is a directory" >&2
+ exit 1
+ fi
+ dst=$dst/`basename "$src"`
+ fi
+ fi
+
+ # This sed command emulates the dirname command.
+ dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+ # Make sure that the destination directory exists.
+
+ # Skip lots of stat calls in the usual case.
+ if test ! -d "$dstdir"; then
+ defaultIFS='
+ '
+ IFS="${IFS-$defaultIFS}"
+
+ oIFS=$IFS
+ # Some sh's can't handle IFS=/ for some reason.
+ IFS='%'
+ set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+ IFS=$oIFS
+
+ pathcomp=
+
+ while test $# -ne 0 ; do
+ pathcomp=$pathcomp$1
+ shift
+ if test ! -d "$pathcomp"; then
+ $mkdirprog "$pathcomp"
+ # mkdir can fail with a `File exist' error in case several
+ # install-sh are creating the directory concurrently. This
+ # is OK.
+ test -d "$pathcomp" || exit
+ fi
+ pathcomp=$pathcomp/
+ done
+ fi
+
+ if test -n "$dir_arg"; then
+ $doit $mkdircmd "$dst" \
+ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+ else
+ dstfile=`basename "$dst"`
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Copy the file name to the temp name.
+ $doit $cpprog "$src" "$dsttmp" &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+ # Now rename the file to the real destination.
+ { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+ || {
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ if test -f "$dstdir/$dstfile"; then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+ || {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit
+ }
+ else
+ :
+ fi
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+ }
+ }
+ fi || { (exit 1); exit; }
+done
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+ (exit 0); exit
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
Removed: vmkit/trunk/autogen.sh
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/autogen.sh?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/autogen.sh (original)
+++ vmkit/trunk/autogen.sh (removed)
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-autoreconf -vfi
-
Added: vmkit/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/configure?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/configure (added)
+++ vmkit/trunk/configure Wed Jun 25 04:59:39 2008
@@ -0,0 +1,8352 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.61 for vmkit 0.0.1.
+#
+# Report bugs to <nicolas.geoffray at lip6.fr>.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+#
+# Copyright (c) 2003-2008 Universite Pierre et Marie Curie.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+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+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# 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
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+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
+IFS=$as_save_IFS
+
+ ;;
+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_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+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) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; 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'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
+ 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=.
+ case $as_dir in
+ /*)
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+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+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+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+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell autoconf at gnu.org about your system,
+ echo including any error possibly output before this
+ echo message
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # 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 after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, 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
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\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 sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+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$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# 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'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# 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`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME='vmkit'
+PACKAGE_TARNAME='vmkit'
+PACKAGE_VERSION='0.0.1'
+PACKAGE_STRING='vmkit 0.0.1'
+PACKAGE_BUGREPORT='nicolas.geoffray at lip6.fr'
+
+ac_unique_file="lib/Mvm/Object.cpp"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_unique_file=""Makefile.common.in""
+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
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+VMKIT_COPYRIGHT
+LLVM_SRC
+LLVM_OBJ
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+target
+target_cpu
+target_vendor
+target_os
+DYLIB_EXTENSION
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CC
+EXEEXT
+OBJEXT
+CPP
+GREP
+EGREP
+GC_MMAP2
+GC_BOEHM
+GC_MULTI_MMAP
+GC_SINGLE_MMAP
+GC_FLAGS
+GC_LIBS
+SERVICE_BUILD_TRUE
+SERVICE_BUILD_FALSE
+ISOLATE_BUILD_TRUE
+ISOLATE_BUILD_FALSE
+classpathglibj
+classpathlibs
+classpathinclude
+gnuclasspathversion
+WITH_N3_TRUE
+WITH_N3_FALSE
+pnetlocalprefix
+CXX
+CXXFLAGS
+ac_ct_CXX
+NM
+LN_S
+CMP
+CP
+DATE
+FIND
+MKDIR
+MV
+RANLIB
+RM
+SED
+TAR
+BINPWD
+CAT
+LLVMAS
+LLC
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+LLVMGCC
+LLVMGXX
+LIBOBJS
+LTLIBOBJS'
+ac_subst_files=''
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+CXX
+CXXFLAGS
+CCC'
+
+
+# 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.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+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
+
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -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)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$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 ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -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'`
+ 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 ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$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 ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ 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 ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$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'`
+ 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; }; }
+ 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 directory names.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
+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
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { echo "$as_me: error: Working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
+# 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 the parent directory.
+ ac_confdir=`$as_dirname -- "$0" ||
+$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
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+ { (exit 1); exit 1; }; }
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# 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 vmkit 0.0.1 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 \`..']
+
+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]
+ --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]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/vmkit]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+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 vmkit 0.0.1:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-llvmsrc Location of LLVM Source Code
+ --with-llvmobj Location of LLVM Object Code
+ --with-thread=something Thread type ('common' or 'no')
+ --with-gc=something GC type ('single-mmap' 'multi-mmap' or 'boehm')
+ --with-vm-type=something
+ VM type ('single' 'multi' or 'service')
+ --with-gnu-classpath-local-prefix=something
+ GNU CLASSPATH local prefix (no default)
+ --with-gnu-classpath-installation-prefix=something
+ GNU CLASSPATH installation prefix (default is
+ '/usr/local/classpath')
+ --with-pnet-local-prefix=something
+ PNET local prefix (no default)
+
+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>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <nicolas.geoffray at lip6.fr>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" || continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested 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
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+vmkit configure 0.0.1
+generated by GNU Autoconf 2.61
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+
+Copyright (c) 2003-2008 Universite Pierre et Marie Curie.
+_ACEOF
+ exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by vmkit $as_me 0.0.1, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+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`
+/usr/bin/hostinfo = `(/usr/bin/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
+IFS=$as_save_IFS
+
+} >&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_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_arg'"
+ ;;
+ 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: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+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,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r 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 -f -r conftest* 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 -n "$CONFIG_SITE"; then
+ set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+ set x "$ac_default_prefix/share/config.site" \
+ "$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+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 $ac_precious_vars; 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
+
+
+
+VMKIT_COPYRIGHT="Copyright (c) 2003-2008 Universite Pierre et Marie Curie."
+
+
+
+
+
+
+
+
+if test ${srcdir} != "." ; then
+ if test -f ${srcdir}/include/mvm/Config/config.h ; then
+ { { echo "$as_me:$LINENO: error: Already configured in ${srcdir}" >&5
+echo "$as_me: error: Already configured in ${srcdir}" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+fi
+
+ac_aux_dir=
+for ac_dir in $LLVM_SRC_ROOT/autoconf "$srcdir"/$LLVM_SRC_ROOT/autoconf; 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 $LLVM_SRC_ROOT/autoconf \"$srcdir\"/$LLVM_SRC_ROOT/autoconf" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $LLVM_SRC_ROOT/autoconf \"$srcdir\"/$LLVM_SRC_ROOT/autoconf" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+
+# Check whether --with-llvmsrc was given.
+if test "${with_llvmsrc+set}" = set; then
+ withval=$with_llvmsrc; llvm_src="$withval"
+else
+ llvm_src="$LLVM_SRC_ROOT"
+fi
+
+ LLVM_SRC=$llvm_src
+
+
+# Check whether --with-llvmobj was given.
+if test "${with_llvmobj+set}" = set; then
+ withval=$with_llvmobj; llvm_obj="$withval"
+else
+ llvm_obj="$LLVM_OBJ_ROOT"
+fi
+
+ LLVM_OBJ=$llvm_obj
+
+ ac_config_commands="$ac_config_commands setup"
+
+
+
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+echo "$as_me: error: cannot run $SHELL $ac_aux_dir/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_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ { { 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=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_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; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+echo "$as_me: error: invalid value of canonical build" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ 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
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+echo "$as_me: error: invalid value of canonical host" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ 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
+ if test "x$target_alias" = x; then
+ ac_cv_target=$ac_cv_host
+else
+ ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
+echo "$as_me: error: invalid value of canonical target" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# 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}-
+
+{ echo "$as_me:$LINENO: checking type of operating system we're going to host on" >&5
+echo $ECHO_N "checking type of operating system we're going to host on... $ECHO_C" >&6; }
+if test "${vmkit_cv_os_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $host in
+ *-*-aix*)
+ { { echo "$as_me:$LINENO: error: Good luck porting vmkit to your host!" >&5
+echo "$as_me: error: Good luck porting vmkit to your host!" >&2;}
+ { (exit 1); exit 1; }; }
+ vmkit_cv_os_type="AIX"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-irix*)
+ { { echo "$as_me:$LINENO: error: Good luck porting vmkit to your host!" >&5
+echo "$as_me: error: Good luck porting vmkit to your host!" >&2;}
+ { (exit 1); exit 1; }; }
+ vmkit_cv_os_type="IRIX"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-cygwin*)
+ { { echo "$as_me:$LINENO: error: Good luck porting vmkit to your host!" >&5
+echo "$as_me: error: Good luck porting vmkit to your host!" >&2;}
+ { (exit 1); exit 1; }; }
+ vmkit_cv_os_type="Cygwin"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-darwin*)
+ DYLIB_EXTENSION="dylib"
+ vmkit_cv_os_type="Darwin"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-freebsd*)
+ { { echo "$as_me:$LINENO: error: Good luck porting vmkit to your host!" >&5
+echo "$as_me: error: Good luck porting vmkit to your host!" >&2;}
+ { (exit 1); exit 1; }; }
+ vmkit_cv_os_type="FreeBSD"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-openbsd*)
+ { { echo "$as_me:$LINENO: error: Good luck porting vmkit to your host!" >&5
+echo "$as_me: error: Good luck porting vmkit to your host!" >&2;}
+ { (exit 1); exit 1; }; }
+ vmkit_cv_os_type="OpenBSD"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-netbsd*)
+ { { echo "$as_me:$LINENO: error: Good luck porting vmkit to your host!" >&5
+echo "$as_me: error: Good luck porting vmkit to your host!" >&2;}
+ { (exit 1); exit 1; }; }
+ vmkit_cv_os_type="NetBSD"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-hpux*)
+ { { echo "$as_me:$LINENO: error: Good luck porting vmkit to your host!" >&5
+echo "$as_me: error: Good luck porting vmkit to your host!" >&2;}
+ { (exit 1); exit 1; }; }
+ vmkit_cv_os_type="HP-UX"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-interix*)
+ { { echo "$as_me:$LINENO: error: Good luck porting vmkit to your host!" >&5
+echo "$as_me: error: Good luck porting vmkit to your host!" >&2;}
+ { (exit 1); exit 1; }; }
+ vmkit_cv_os_type="Interix"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-linux*)
+ DYLIB_EXTENSION="so"
+ vmkit_cv_os_type="Linux"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-solaris*)
+ { { echo "$as_me:$LINENO: error: Good luck porting vmkit to your host!" >&5
+echo "$as_me: error: Good luck porting vmkit to your host!" >&2;}
+ { (exit 1); exit 1; }; }
+ vmkit_cv_os_type="SunOS"
+ vmkit_cv_platform_type="Unix" ;;
+ *-*-win32*)
+ { { echo "$as_me:$LINENO: error: Good luck porting vmkit to your host!" >&5
+echo "$as_me: error: Good luck porting vmkit to your host!" >&2;}
+ { (exit 1); exit 1; }; }
+ vmkit_cv_os_type="Win32"
+ vmkit_cv_platform_type="Win32" ;;
+ *-*-mingw*)
+ { { echo "$as_me:$LINENO: error: Good luck porting vmkit to your host!" >&5
+echo "$as_me: error: Good luck porting vmkit to your host!" >&2;}
+ { (exit 1); exit 1; }; }
+ vmkit_cv_os_type="MingW"
+ vmkit_cv_platform_type="Win32" ;;
+ *)
+ { { echo "$as_me:$LINENO: error: Good luck porting vmkit to your host!" >&5
+echo "$as_me: error: Good luck porting vmkit to your host!" >&2;}
+ { (exit 1); exit 1; }; }
+ vmkit_cv_os_type="Unknown"
+ vmkit_cv_platform_type="Unknown" ;;
+esac
+fi
+{ echo "$as_me:$LINENO: result: $vmkit_cv_os_type" >&5
+echo "${ECHO_T}$vmkit_cv_os_type" >&6; }
+
+
+
+
+
+
+# Check whether --with-thread was given.
+if test "${with_thread+set}" = set; then
+ withval=$with_thread; thread=$withval
+else
+ thread=common
+
+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
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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.exe
+ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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.exe
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+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`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -V >&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
+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[^ ]*//'`
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort. b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions. Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
+if test -z "$ac_file"; then
+ 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
+
+# Check that 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'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 that 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 { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 | *.map | *.inf | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ 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
+{ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+ *) 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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
+{ 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
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CFLAGS=""
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+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 ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_c89=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 -std 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 -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 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
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c89=$ac_arg
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+ xno)
+ { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+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=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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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 grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ # Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_GREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_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_path_EGREP="$GREP -E"
+ else
+ # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_EGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ # Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_EGREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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>
+#include <stdlib.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))
+ return 2;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core.conftest.* 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 { as_var=$as_ac_Header; eval "test \"\${$as_var+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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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
+
+
+if test "x$thread" != "xno"; then
+ if test "${ac_cv_header_pthread_h+set}" = set; then
+ { echo "$as_me:$LINENO: checking for pthread.h" >&5
+echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_pthread_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
+echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking pthread.h usability" >&5
+echo $ECHO_N "checking pthread.h 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 <pthread.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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 pthread.h presence" >&5
+echo $ECHO_N "checking pthread.h 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 <pthread.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## --------------------------------------- ##
+## Report this to nicolas.geoffray at lip6.fr ##
+## --------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for pthread.h" >&5
+echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_pthread_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_pthread_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
+echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; }
+
+fi
+if test $ac_cv_header_pthread_h = yes; then
+ :
+else
+ { echo "$as_me:$LINENO: WARNING: phtread include NOT found" >&5
+echo "$as_me: WARNING: phtread include NOT found" >&2;}
+fi
+
+
+
+{ echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
+echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
+if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_pthread_pthread_create=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_pthread_pthread_create=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; }
+if test $ac_cv_lib_pthread_pthread_create = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPTHREAD 1
+_ACEOF
+
+ LIBS="-lpthread $LIBS"
+
+else
+ { { echo "$as_me:$LINENO: error: pthread library not found" >&5
+echo "$as_me: error: pthread library not found" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
+fi
+
+
+if test "x$thread" = xcommon; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PTHREAD 1
+_ACEOF
+
+fi
+
+
+# Check whether --with-gc was given.
+if test "${with_gc+set}" = set; then
+ withval=$with_gc; gc=$withval
+else
+ echo Using mmap2 as vvm gc type.
+ gc=single-mmap
+
+
+fi
+
+
+if test "x$gc" = "xboehm"; then
+ GC_FLAGS ="-I$PWD/lib/Mvm/BoehmGC -DGC_THREADS"
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_GC_BOEHM 1
+_ACEOF
+
+ GC_MMAP2=0
+
+ GC_BOEHM=1
+
+ GC_LIBS=BoehmGC
+ case $target_os in
+ *linux*)
+ GC_FLAGS="-I$PWD/lib/Mvm/BoehmGC -DGC_THREADS -DGC_LINUX_THREADS"
+ ;;
+ esac
+else
+ GC_LIBS=GCMmap2
+ if test "x$gc" = "xmulti-mmap"; then
+ GC_FLAGS="-I$PWD/lib/Mvm/GCMmap2 -DWITH_TRACER -DMULTIPLE_GC"
+ GC_MULTI_MMAP=1
+
+ GC_SINGLE_MMAP=0
+
+ else
+ GC_FLAGS="-I$PWD/lib/Mvm/GCMmap2 -DWITH_TRACER"
+ GC_MULTI_MMAP=0
+
+ GC_SINGLE_MMAP=1
+
+ fi
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_GC_MMAP2 1
+_ACEOF
+
+ GC_MMAP2=1
+
+ GC_BOEHM=0
+
+fi
+
+
+
+
+
+# Check whether --with-vm-type was given.
+if test "${with_vm_type+set}" = set; then
+ withval=$with_vm_type; vmtype=$withval
+else
+ echo Using single as vm type.
+ vmtype=single
+
+
+fi
+
+
+if test "x$vmtype" = "xmulti"; then
+ CFLAGS="$CFLAGS -DMULTIPLE_VM"
+ CXXFLAGS="$CXXFLAGS -DMULTIPLE_VM"
+else
+ if test "x$vmtype" = "xservice"; then
+ CFLAGS="$CFLAGS -DMULTIPLE_VM -DSERVICE_GC -DMULTIPLE_GC -DSERVICE_VM -I$PWD/lib/Mvm/Allocator"
+ CXXFLAGS="$CXXFLAGS -DMULTIPLE_VM -DSERVICE_GC -DMULTIPLE_GC -DSERVICE_VM -I$PWD/lib/Mvm/Allocator"
+ fi
+fi
+
+
+
+if test "x$vmtype" = "xservice"; then
+ SERVICE_BUILD_TRUE=
+ SERVICE_BUILD_FALSE='#'
+else
+ SERVICE_BUILD_TRUE='#'
+ SERVICE_BUILD_FALSE=
+fi
+
+
+
+if test "x$vmtype" = "xmulti"; then
+ ISOLATE_BUILD_TRUE=
+ ISOLATE_BUILD_FALSE='#'
+else
+ ISOLATE_BUILD_TRUE='#'
+ ISOLATE_BUILD_FALSE=
+fi
+
+
+
+gnuclasspathversion=0.93;
+
+
+# Check whether --with-gnu-classpath-local-prefix was given.
+if test "${with_gnu_classpath_local_prefix+set}" = set; then
+ withval=$with_gnu_classpath_local_prefix; gnuclasspathlocalprefix=$withval
+else
+ echo Not using GNU CLASSPATH local prefix.
+ gnuclasspathlocalprefix=''
+
+
+fi
+
+
+
+# Check whether --with-gnu-classpath-installation-prefix was given.
+if test "${with_gnu_classpath_installation_prefix+set}" = set; then
+ withval=$with_gnu_classpath_installation_prefix; gnuclasspathinstallationprefix=$withval
+else
+ gnuclasspathinstallationprefix=/usr/local/classpath
+
+fi
+
+
+if test "x${gnuclasspathlocalprefix}" = x; then
+ echo Using ${gnuclasspathinstallationprefix} as GNU CLASSPATH installation prefix;
+ classpathglibj=${gnuclasspathinstallationprefix}/share/classpath/glibj.zip;
+ classpathlibs=${gnuclasspathinstallationprefix}/lib/classpath/;
+ classpathinclude=${gnuclasspathlocalprefix}/include;
+else
+ echo Using ${gnuclasspathlocalprefix} as GNU CLASSPATH local prefix;
+ classpathglibj=${gnuclasspathlocalprefix}/lib/;
+ classpathlibs=${gnuclasspathlocalprefix}/lib/;
+ classpathinclude=${gnuclasspathlocalprefix}/include;
+fi
+
+
+
+
+
+
+
+
+# Check whether --with-pnet-local-prefix was given.
+if test "${with_pnet_local_prefix+set}" = set; then
+ withval=$with_pnet_local_prefix; pnetlocalprefix=$withval
+else
+ echo Not using PNETlocal prefix.
+ pnetlocalprefix=''
+
+
+fi
+
+
+
+
+if test "x$pnetlocalprefix" != "x"; then
+ WITH_N3_TRUE=
+ WITH_N3_FALSE='#'
+else
+ WITH_N3_TRUE='#'
+ WITH_N3_FALSE=
+fi
+
+if test "x$pnetlocalprefix" != x; then
+ echo Using ${pnetlocalprefix} as PNET local prefix;
+
+cat >>confdefs.h <<\_ACEOF
+#define WITH_N3 1
+_ACEOF
+
+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 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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
+
+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
+ for ac_prog in gcc
+ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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 gcc
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ 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`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -V >&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_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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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
+{ 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
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CFLAGS=""
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+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 ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_c89=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 -std 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 -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 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
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c89=$ac_arg
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+ xno)
+ { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+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=cpp
+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 -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++
+ 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_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CXX"; then
+ ac_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_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
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_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 g++
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+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`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -V >&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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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
+{ 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
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cxx_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CXXFLAGS=""
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ 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 { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cxx_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+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
+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 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
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_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
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ 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
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6; }
+NM="$lt_cv_path_NM"
+
+
+
+{ 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
+
+# Extract the first word of "cmp", so it can be a program name with args.
+set dummy cmp; 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_CMP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $CMP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CMP="$CMP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CMP="$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
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_CMP" && ac_cv_path_CMP="cmp"
+ ;;
+esac
+fi
+CMP=$ac_cv_path_CMP
+if test -n "$CMP"; then
+ { echo "$as_me:$LINENO: result: $CMP" >&5
+echo "${ECHO_T}$CMP" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "cp", so it can be a program name with args.
+set dummy cp; 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_CP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $CP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CP="$CP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CP="$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
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_CP" && ac_cv_path_CP="cp"
+ ;;
+esac
+fi
+CP=$ac_cv_path_CP
+if test -n "$CP"; then
+ { echo "$as_me:$LINENO: result: $CP" >&5
+echo "${ECHO_T}$CP" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "date", so it can be a program name with args.
+set dummy date; 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_DATE+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $DATE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_DATE="$DATE" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_DATE="$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
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_DATE" && ac_cv_path_DATE="date"
+ ;;
+esac
+fi
+DATE=$ac_cv_path_DATE
+if test -n "$DATE"; then
+ { echo "$as_me:$LINENO: result: $DATE" >&5
+echo "${ECHO_T}$DATE" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "find", so it can be a program name with args.
+set dummy find; 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_FIND+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $FIND in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_FIND="$FIND" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_FIND="$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
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_FIND" && ac_cv_path_FIND="find"
+ ;;
+esac
+fi
+FIND=$ac_cv_path_FIND
+if test -n "$FIND"; then
+ { echo "$as_me:$LINENO: result: $FIND" >&5
+echo "${ECHO_T}$FIND" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "grep", so it can be a program name with args.
+set dummy grep; 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_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $GREP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GREP="$GREP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GREP="$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
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GREP" && ac_cv_path_GREP="grep"
+ ;;
+esac
+fi
+GREP=$ac_cv_path_GREP
+if test -n "$GREP"; then
+ { echo "$as_me:$LINENO: result: $GREP" >&5
+echo "${ECHO_T}$GREP" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "mkdir", so it can be a program name with args.
+set dummy mkdir; 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_MKDIR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $MKDIR in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MKDIR="$MKDIR" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_MKDIR="$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
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_MKDIR" && ac_cv_path_MKDIR="mkdir"
+ ;;
+esac
+fi
+MKDIR=$ac_cv_path_MKDIR
+if test -n "$MKDIR"; then
+ { echo "$as_me:$LINENO: result: $MKDIR" >&5
+echo "${ECHO_T}$MKDIR" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "mv", so it can be a program name with args.
+set dummy mv; 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_MV+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $MV in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MV="$MV" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_MV="$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
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_MV" && ac_cv_path_MV="mv"
+ ;;
+esac
+fi
+MV=$ac_cv_path_MV
+if test -n "$MV"; then
+ { echo "$as_me:$LINENO: result: $MV" >&5
+echo "${ECHO_T}$MV" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+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
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+# Extract the first word of "rm", so it can be a program name with args.
+set dummy rm; 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_RM+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $RM in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_RM="$RM" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_RM="$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
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm"
+ ;;
+esac
+fi
+RM=$ac_cv_path_RM
+if test -n "$RM"; then
+ { echo "$as_me:$LINENO: result: $RM" >&5
+echo "${ECHO_T}$RM" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "sed", so it can be a program name with args.
+set dummy sed; 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_SED+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $SED in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SED="$SED" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_SED="$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
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_SED" && ac_cv_path_SED="sed"
+ ;;
+esac
+fi
+SED=$ac_cv_path_SED
+if test -n "$SED"; then
+ { echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "tar", so it can be a program name with args.
+set dummy tar; 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_TAR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $TAR in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_TAR="$TAR" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_TAR="$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
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_TAR" && ac_cv_path_TAR="gtar"
+ ;;
+esac
+fi
+TAR=$ac_cv_path_TAR
+if test -n "$TAR"; then
+ { echo "$as_me:$LINENO: result: $TAR" >&5
+echo "${ECHO_T}$TAR" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "pwd", so it can be a program name with args.
+set dummy pwd; 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_BINPWD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $BINPWD in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_BINPWD="$BINPWD" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_BINPWD="$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
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_BINPWD" && ac_cv_path_BINPWD="pwd"
+ ;;
+esac
+fi
+BINPWD=$ac_cv_path_BINPWD
+if test -n "$BINPWD"; then
+ { echo "$as_me:$LINENO: result: $BINPWD" >&5
+echo "${ECHO_T}$BINPWD" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "cat", so it can be a program name with args.
+set dummy cat; 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_CAT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $CAT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CAT="$CAT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_CAT="$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
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_CAT" && ac_cv_path_CAT="cat"
+ ;;
+esac
+fi
+CAT=$ac_cv_path_CAT
+if test -n "$CAT"; then
+ { echo "$as_me:$LINENO: result: $CAT" >&5
+echo "${ECHO_T}$CAT" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+
+# Extract the first word of "llvm-as", so it can be a program name with args.
+set dummy llvm-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_path_LLVMAS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $LLVMAS in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_LLVMAS="$LLVMAS" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_LLVMAS="$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
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_LLVMAS" && ac_cv_path_LLVMAS="llvm-as"
+ ;;
+esac
+fi
+LLVMAS=$ac_cv_path_LLVMAS
+if test -n "$LLVMAS"; then
+ { echo "$as_me:$LINENO: result: $LLVMAS" >&5
+echo "${ECHO_T}$LLVMAS" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "llc", so it can be a program name with args.
+set dummy llc; 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_LLC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $LLC in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_LLC="$LLC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_LLC="$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
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_LLC" && ac_cv_path_LLC="llc"
+ ;;
+esac
+fi
+LLC=$ac_cv_path_LLC
+if test -n "$LLC"; then
+ { echo "$as_me:$LINENO: result: $LLC" >&5
+echo "${ECHO_T}$LLC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+
+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. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ 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'
+
+
+if test "$WITH_LLVMGCCDIR" = "default" ; then
+ LLVMGCC="llvm-gcc${EXEEXT}"
+ LLVMGXX="llvm-g++${EXEEXT}"
+ # Extract the first word of "$LLVMGCC", so it can be a program name with args.
+set dummy $LLVMGCC; 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_LLVMGCC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $LLVMGCC in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_LLVMGCC="$LLVMGCC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_LLVMGCC="$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
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+LLVMGCC=$ac_cv_path_LLVMGCC
+if test -n "$LLVMGCC"; then
+ { echo "$as_me:$LINENO: result: $LLVMGCC" >&5
+echo "${ECHO_T}$LLVMGCC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ # Extract the first word of "$LLVMGXX", so it can be a program name with args.
+set dummy $LLVMGXX; 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_LLVMGXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $LLVMGXX in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_LLVMGXX="$LLVMGXX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_LLVMGXX="$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
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+LLVMGXX=$ac_cv_path_LLVMGXX
+if test -n "$LLVMGXX"; then
+ { echo "$as_me:$LINENO: result: $LLVMGXX" >&5
+echo "${ECHO_T}$LLVMGXX" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+else
+ if test -z "$LLVMGCC"; then
+ LLVMGCC="$WITH_LLVMGCCDIR/bin/llvm-gcc${EXEEXT}"
+ fi
+ if test -z "$LLVMGXX"; then
+ LLVMGXX="$WITH_LLVMGCCDIR/bin/llvm-g++${EXEEXT}"
+ fi
+ LLVMGCC=$LLVMGCC
+
+ LLVMGXX=$LLVMGXX
+
+fi
+
+{ echo "$as_me:$LINENO: checking tool compatibility" >&5
+echo $ECHO_N "checking tool compatibility... $ECHO_C" >&6; }
+
+ICC=no
+IXX=no
+case $CC in
+ icc*|icpc*)
+ ICC=yes
+ IXX=yes
+ ;;
+ *)
+ ;;
+esac
+
+if test "$GCC" != "yes" && test "$ICC" != "yes"
+then
+ { { echo "$as_me:$LINENO: error: gcc|icc required but not found" >&5
+echo "$as_me: error: gcc|icc required but not found" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+if test "$GXX" != "yes" && test "$IXX" != "yes"
+then
+ { { echo "$as_me:$LINENO: error: g++|icc required but not found" >&5
+echo "$as_me: error: g++|icc required but not found" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+if test "$GCC" = "yes"
+then
+ cat >conftest.$ac_ext <<_ACEOF
+#if !defined(__GNUC__) || __GNUC__ < 3
+#error Unsupported GCC version
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { { echo "$as_me:$LINENO: error: gcc 3.x required, but you have a lower version" >&5
+echo "$as_me: error: gcc 3.x required, but you have a lower version" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+{ echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6; }
+
+
+
+
+{ echo "$as_me:$LINENO: checking for inflate in -lz" >&5
+echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6; }
+if test "${ac_cv_lib_z_inflate+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inflate ();
+int
+main ()
+{
+return inflate ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_z_inflate=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_z_inflate=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
+echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6; }
+if test $ac_cv_lib_z_inflate = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+ LIBS="-lz $LIBS"
+
+else
+ \
+ { { echo "$as_me:$LINENO: error: You need to install the zlib package (z)." >&5
+echo "$as_me: error: You need to install the zlib package (z)." >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+
+if test "x$gc" = "xboehm"; then
+
+{ echo "$as_me:$LINENO: checking for GC_malloc in -lgc" >&5
+echo $ECHO_N "checking for GC_malloc in -lgc... $ECHO_C" >&6; }
+if test "${ac_cv_lib_gc_GC_malloc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgc $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char GC_malloc ();
+int
+main ()
+{
+return GC_malloc ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_gc_GC_malloc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_gc_GC_malloc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_gc_GC_malloc" >&5
+echo "${ECHO_T}$ac_cv_lib_gc_GC_malloc" >&6; }
+if test $ac_cv_lib_gc_GC_malloc = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBGC 1
+_ACEOF
+
+ LIBS="-lgc $LIBS"
+
+else
+ \
+ { { echo "$as_me:$LINENO: error: You need to install the boehm-gc package (gc)." >&5
+echo "$as_me: error: You need to install the boehm-gc package (gc)." >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+fi
+
+
+if test "${ac_cv_header_zlib_h+set}" = set; then
+ { echo "$as_me:$LINENO: checking for zlib.h" >&5
+echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_zlib_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking zlib.h usability" >&5
+echo $ECHO_N "checking zlib.h 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 <zlib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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 zlib.h presence" >&5
+echo $ECHO_N "checking zlib.h 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 <zlib.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## --------------------------------------- ##
+## Report this to nicolas.geoffray at lip6.fr ##
+## --------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for zlib.h" >&5
+echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_zlib_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_zlib_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
+
+fi
+if test $ac_cv_header_zlib_h = yes; then
+ :
+else
+ \
+ { { echo "$as_me:$LINENO: error: You need to install the zlib devel package (zlib.h)." >&5
+echo "$as_me: error: You need to install the zlib devel package (zlib.h)." >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+
+
+if test "x$gc" = "xboehm"; then
+ if test "${ac_cv_header_gc_gc_h+set}" = set; then
+ { echo "$as_me:$LINENO: checking for gc/gc.h" >&5
+echo $ECHO_N "checking for gc/gc.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_gc_gc_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_gc_gc_h" >&5
+echo "${ECHO_T}$ac_cv_header_gc_gc_h" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking gc/gc.h usability" >&5
+echo $ECHO_N "checking gc/gc.h 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 <gc/gc.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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 gc/gc.h presence" >&5
+echo $ECHO_N "checking gc/gc.h 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 <gc/gc.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.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: gc/gc.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: gc/gc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gc/gc.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: gc/gc.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: gc/gc.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: gc/gc.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gc/gc.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: gc/gc.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gc/gc.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: gc/gc.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gc/gc.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: gc/gc.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gc/gc.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: gc/gc.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: gc/gc.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: gc/gc.h: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## --------------------------------------- ##
+## Report this to nicolas.geoffray at lip6.fr ##
+## --------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for gc/gc.h" >&5
+echo $ECHO_N "checking for gc/gc.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_gc_gc_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_gc_gc_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_gc_gc_h" >&5
+echo "${ECHO_T}$ac_cv_header_gc_gc_h" >&6; }
+
+fi
+if test $ac_cv_header_gc_gc_h = yes; then
+ :
+else
+ \
+ { { echo "$as_me:$LINENO: error: You need to install the boehm-gc devel package (gc/gc.h)." >&5
+echo "$as_me: error: You need to install the boehm-gc devel package (gc/gc.h)." >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+
+fi
+
+
+nl===-----------------------------------------------------------------------===
+
+{ echo "$as_me:$LINENO: checking for pid_t" >&5
+echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_pid_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
+typedef pid_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_pid_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_pid_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
+echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
+if test $ac_cv_type_pid_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
+
+fi
+
+{ echo "$as_me:$LINENO: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_size_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
+typedef size_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_size_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_size_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
+if test $ac_cv_type_size_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
+if test "${ac_cv_type_signal+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 <signal.h>
+
+int
+main ()
+{
+return *(signal (0, 0)) (0) == 1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_signal=int
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_signal=void
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+echo "${ECHO_T}$ac_cv_type_signal" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define RETSIGTYPE $ac_cv_type_signal
+_ACEOF
+
+
+{ 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 tm;
+ int *p = &tm.tm_sec;
+ return !p;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; 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 core 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 int64_t" >&5
+echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_int64_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
+typedef int64_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_int64_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_int64_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5
+echo "${ECHO_T}$ac_cv_type_int64_t" >&6; }
+if test $ac_cv_type_int64_t = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INT64_T 1
+_ACEOF
+
+
+else
+ { { echo "$as_me:$LINENO: error: Type int64_t required but not found" >&5
+echo "$as_me: error: Type int64_t required but not found" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+{ echo "$as_me:$LINENO: checking for uint64_t" >&5
+echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_uint64_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
+typedef uint64_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_uint64_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_uint64_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5
+echo "${ECHO_T}$ac_cv_type_uint64_t" >&6; }
+if test $ac_cv_type_uint64_t = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINT64_T 1
+_ACEOF
+
+
+else
+ { echo "$as_me:$LINENO: checking for u_int64_t" >&5
+echo $ECHO_N "checking for u_int64_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_u_int64_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
+typedef u_int64_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_u_int64_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_u_int64_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5
+echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6; }
+if test $ac_cv_type_u_int64_t = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_U_INT64_T 1
+_ACEOF
+
+
+else
+ { { echo "$as_me:$LINENO: error: Type uint64_t or u_int64_t required but not found" >&5
+echo "$as_me: error: Type uint64_t or u_int64_t required but not found" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+
+
+
+
+
+for ac_func in setjmp longjmp
+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 { as_var=$as_ac_var; eval "test \"\${$as_var+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. */
+/* 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 GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+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
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&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
+
+
+
+
+
+ac_config_headers="$ac_config_headers include/mvm/Config/config.h"
+
+
+
+
+ac_config_files="$ac_config_files Makefile.common"
+
+ac_config_files="$ac_config_files Makefile.config"
+
+ac_config_files="$ac_config_files lib/JnJVM/Classpath/Classpath.h"
+
+
+ac_config_commands="$ac_config_commands Makefile"
+
+
+ac_config_commands="$ac_config_commands lib/Makefile"
+
+
+
+
+
+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, we kill variables containing newlines.
+# 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.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ 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 "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ 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}'
+
+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_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${SERVICE_BUILD_TRUE}" && test -z "${SERVICE_BUILD_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"SERVICE_BUILD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"SERVICE_BUILD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${ISOLATE_BUILD_TRUE}" && test -z "${ISOLATE_BUILD_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"ISOLATE_BUILD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"ISOLATE_BUILD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${WITH_N3_TRUE}" && test -z "${WITH_N3_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"WITH_N3\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"WITH_N3\" 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 more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+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+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# 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
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+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
+IFS=$as_save_IFS
+
+ ;;
+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_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+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) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; 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'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # 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 after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, 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
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\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 sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+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$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# 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'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by vmkit $as_me 0.0.1, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+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 and configuration settings, 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 commands:
+$config_commands
+
+Report bugs to <bug-autoconf at gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+vmkit config.status 0.0.1
+configured by $0, generated by GNU Autoconf 2.61,
+ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+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
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --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;;
+ --he | --h)
+ # Conflict between --help and --header
+ { 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 ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { 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"
+ ac_need_defaults=false ;;
+
+ 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 CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ CONFIG_SHELL=$SHELL
+ export CONFIG_SHELL
+ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS
+#
+llvm_src="${LLVM_SRC}"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "setup") CONFIG_COMMANDS="$CONFIG_COMMANDS setup" ;;
+ "include/mvm/Config/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/mvm/Config/config.h" ;;
+ "Makefile.common") CONFIG_FILES="$CONFIG_FILES Makefile.common" ;;
+ "Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;;
+ "lib/JnJVM/Classpath/Classpath.h") CONFIG_FILES="$CONFIG_FILES lib/JnJVM/Classpath/Classpath.h" ;;
+ "Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile" ;;
+ "lib/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS lib/Makefile" ;;
+
+ *) { { 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_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 against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$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 "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for 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
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+VMKIT_COPYRIGHT!$VMKIT_COPYRIGHT$ac_delim
+LLVM_SRC!$LLVM_SRC$ac_delim
+LLVM_OBJ!$LLVM_OBJ$ac_delim
+build!$build$ac_delim
+build_cpu!$build_cpu$ac_delim
+build_vendor!$build_vendor$ac_delim
+build_os!$build_os$ac_delim
+host!$host$ac_delim
+host_cpu!$host_cpu$ac_delim
+host_vendor!$host_vendor$ac_delim
+host_os!$host_os$ac_delim
+target!$target$ac_delim
+target_cpu!$target_cpu$ac_delim
+target_vendor!$target_vendor$ac_delim
+target_os!$target_os$ac_delim
+DYLIB_EXTENSION!$DYLIB_EXTENSION$ac_delim
+CC!$CC$ac_delim
+CFLAGS!$CFLAGS$ac_delim
+LDFLAGS!$LDFLAGS$ac_delim
+CPPFLAGS!$CPPFLAGS$ac_delim
+ac_ct_CC!$ac_ct_CC$ac_delim
+EXEEXT!$EXEEXT$ac_delim
+OBJEXT!$OBJEXT$ac_delim
+CPP!$CPP$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+GC_MMAP2!$GC_MMAP2$ac_delim
+GC_BOEHM!$GC_BOEHM$ac_delim
+GC_MULTI_MMAP!$GC_MULTI_MMAP$ac_delim
+GC_SINGLE_MMAP!$GC_SINGLE_MMAP$ac_delim
+GC_FLAGS!$GC_FLAGS$ac_delim
+GC_LIBS!$GC_LIBS$ac_delim
+SERVICE_BUILD_TRUE!$SERVICE_BUILD_TRUE$ac_delim
+SERVICE_BUILD_FALSE!$SERVICE_BUILD_FALSE$ac_delim
+ISOLATE_BUILD_TRUE!$ISOLATE_BUILD_TRUE$ac_delim
+ISOLATE_BUILD_FALSE!$ISOLATE_BUILD_FALSE$ac_delim
+classpathglibj!$classpathglibj$ac_delim
+classpathlibs!$classpathlibs$ac_delim
+classpathinclude!$classpathinclude$ac_delim
+gnuclasspathversion!$gnuclasspathversion$ac_delim
+WITH_N3_TRUE!$WITH_N3_TRUE$ac_delim
+WITH_N3_FALSE!$WITH_N3_FALSE$ac_delim
+pnetlocalprefix!$pnetlocalprefix$ac_delim
+CXX!$CXX$ac_delim
+CXXFLAGS!$CXXFLAGS$ac_delim
+ac_ct_CXX!$ac_ct_CXX$ac_delim
+NM!$NM$ac_delim
+LN_S!$LN_S$ac_delim
+CMP!$CMP$ac_delim
+CP!$CP$ac_delim
+DATE!$DATE$ac_delim
+FIND!$FIND$ac_delim
+MKDIR!$MKDIR$ac_delim
+MV!$MV$ac_delim
+RANLIB!$RANLIB$ac_delim
+RM!$RM$ac_delim
+SED!$SED$ac_delim
+TAR!$TAR$ac_delim
+BINPWD!$BINPWD$ac_delim
+CAT!$CAT$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+LLVMAS!$LLVMAS$ac_delim
+LLC!$LLC$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+LLVMGCC!$LLVMGCC$ac_delim
+LLVMGXX!$LLVMGXX$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 9; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# 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
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+ { (exit 1); exit 1; }; };;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ ac_file_inputs="$ac_file_inputs $ac_f"
+ done
+
+ # 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. */
+ configure_input="Generated from "`IFS=:
+ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ fi
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin";;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$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'`
+ { as_dir="$ac_dir"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$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'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out"; rm -f "$tmp/out";;
+ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+ esac
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+_ACEOF
+
+# Transform confdefs.h into a sed script `conftest.defines', that
+# substitutes the proper values into config.h.in to produce config.h.
+rm -f conftest.defines conftest.tail
+# First, append a space to every undef/define line, to ease matching.
+echo 's/$/ /' >conftest.defines
+# Then, protect against being on the right side of a sed subst, or in
+# an unquoted here document, in config.status. If some macros were
+# called several times there might be several #defines for the same
+# symbol, which is useless. But do not sort them, since the last
+# AC_DEFINE must be honored.
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
+# NAME is the cpp macro being defined, VALUE is the value it is being given.
+# PARAMS is the parameter list in the macro definition--in most cases, it's
+# just an empty string.
+ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
+ac_dB='\\)[ (].*,\\1define\\2'
+ac_dC=' '
+ac_dD=' ,'
+
+uniq confdefs.h |
+ sed -n '
+ t rset
+ :rset
+ s/^[ ]*#[ ]*define[ ][ ]*//
+ t ok
+ d
+ :ok
+ s/[\\&,]/\\&/g
+ s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+ s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
+ ' >>conftest.defines
+
+# Remove the space that was appended to ease matching.
+# Then replace #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.
+# (The regexp can be short, since the line contains either #define or #undef.)
+echo 's/ $//
+s,^[ #]*u.*,/* & */,' >>conftest.defines
+
+# Break up conftest.defines:
+ac_max_sed_lines=50
+
+# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
+# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
+# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
+# et cetera.
+ac_in='$ac_file_inputs'
+ac_out='"$tmp/out1"'
+ac_nxt='"$tmp/out2"'
+
+while :
+do
+ # Write a here document:
+ cat >>$CONFIG_STATUS <<_ACEOF
+ # First, check the format of the line:
+ cat >"\$tmp/defines.sed" <<\\CEOF
+/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
+/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
+b
+:def
+_ACEOF
+ sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
+ ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
+ sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
+ grep . conftest.tail >/dev/null || break
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines conftest.tail
+
+echo "ac_result=$ac_in" >>$CONFIG_STATUS
+cat >>$CONFIG_STATUS <<\_ACEOF
+ if test x"$ac_file" != x-; then
+ echo "/* $configure_input */" >"$tmp/config.h"
+ cat "$ac_result" >>"$tmp/config.h"
+ 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
+ rm -f $ac_file
+ mv "$tmp/config.h" $ac_file
+ fi
+ else
+ echo "/* $configure_input */"
+ cat "$ac_result"
+ fi
+ rm -f "$tmp/out12"
+ ;;
+
+ :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
+echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname Makefile`
+ ${SHELL} ${llvm_src}/autoconf/install-sh -c ${srcdir}/Makefile Makefile ;;
+ "lib/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname lib/Makefile`
+ ${SHELL} ${llvm_src}/autoconf/install-sh -c ${srcdir}/lib/Makefile lib/Makefile ;;
+
+ esac
+done # for ac_tag
+
+
+{ (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
+
Propchange: vmkit/trunk/configure
------------------------------------------------------------------------------
svn:executable = *
Removed: vmkit/trunk/configure.ac
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/configure.ac?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/configure.ac (original)
+++ vmkit/trunk/configure.ac (removed)
@@ -1,339 +0,0 @@
-dnl Process this file with autoconf to produce a configure script
-
-AC_INIT([vmkit],[0.0.1])
-AC_PREREQ([2.59])
-AC_CONFIG_SRCDIR([lib/Mvm/Main.cpp])
-
-
-dnl **************************************************************************
-dnl configure date, in version.cc.in
-dnl **************************************************************************
-configure_date=`date '+%Y-%m-%d %H:%M:%S'`
-AC_SUBST([configure_date])
-
-dnl **************************************************************************
-dnl Initialize target_cpu, target_os etc ...
-dnl **************************************************************************
-AC_CANONICAL_TARGET
-
-dnl **************************************************************************
-dnl Add some vars
-dnl **************************************************************************
-AM_CONDITIONAL(ARCH_IS_PPC, [test x"$target_cpu" = xpowerpc])
-AM_CONDITIONAL(ARCH_IS_I686, [test x"$target_cpu" = xi686])
-
-case $host in
- *linux*) is_linux=true;;
- *) is_linux=false;;
-esac
-AM_CONDITIONAL(IS_LINUX, [test x$is_linux = xtrue])
-
-dnl **************************************************************************
-dnl Initialize automake with a package version
-dnl **************************************************************************
-AM_INIT_AUTOMAKE
-
-dnl Use config.h instad of -D macros
-AM_CONFIG_HEADER(config.h)
-
-dnl **************************************************************************
-dnl LLVM Installation Prefix
-dnl **************************************************************************
-AC_ARG_WITH(llvm,
- [AS_HELP_STRING(--with-llvm=something,
- [LLVM installation prefix (default is /usr/local/)])],
- [[llvmprefix=$withval]],
- [[ echo Using /usr/local/ as llvm installation prefix.
- llvmprefix=/usr/local/
- ]]
-)
-LLVMDYLIB="`$llvmprefix/Release/bin/llvm-config --ldflags all` `$llvmprefix/Release/bin/llvm-config --libs all`"
-
-AC_SUBST([llvmprefix])
-
-dnl Force some compilation flags
-CXXFLAGS="$CXXFLAGS -fsigned-char -felide-constructors -fno-keep-static-consts -D_REENTRANT -I$PWD/include -I$llvmprefix/include -D__STDC_LIMIT_MACROS -rdynamic"
-CFLAGS="$CFLAGS -D_REENTRANT"
-
-
-dnl **************************************************************************
-dnl Checks for programs.
-dnl **************************************************************************
-AC_PROG_CXX
-AM_PROG_CC_C_O
-
-dnl **************************************************************************
-dnl check for lex and yacc or bison
-dnl **************************************************************************
-AM_PROG_LEX
-AC_PROG_YACC
-
-dnl **************************************************************************
-dnl check for as
-dnl **************************************************************************
-AM_PROG_AS
-
-dnl **************************************************************************
-dnl Checks for header files.
-dnl **************************************************************************
-AC_HEADER_STDC
-
-dnl **************************************************************************
-dnl Checks for header files.
-dnl **************************************************************************
-AC_HEADER_STDC
-
-case $target_os in
- *linux*)
- dnl libiberty, libopcode and libbfd are part of binutils
- AC_CHECK_HEADER([bfd.h], [], \
- AC_MSG_ERROR([You need to install the binutils devel package (bfd.h).])
- )
- AC_CHECK_HEADER([dis-asm.h], [], \
- AC_MSG_ERROR([You need to install the binutils devel package (dis-asm.h).])
- )
- ;;
-esac
-
-AC_CHECK_HEADER([zlib.h], [], \
- AC_MSG_ERROR([You need to install the zlib devel package (zlib.h).])
-)
-
-dnl **************************************************************************
-dnl Checks for libraries
-dnl **************************************************************************
-case $target_os in
- *darwin*)
- DYLIB_EXTENSION="dylib"
- rdynamic=""
- ;;
- *linux*)
- AC_CHECK_LIB(iberty, xexit, [], \
- [AC_MSG_ERROR([You need to install the binutils package (iberty).])]
- )
- AC_CHECK_LIB(bfd, bfd_get_arch, [], \
- [AC_MSG_ERROR([You need to install the binutils package (bfd).])],
- -liberty
- )
- AC_CHECK_LIB(opcodes, disassembler, [], \
- [AC_MSG_ERROR([You need to install the binutils package (opcodes).])],
- -lbfd -liberty
- )
-
- rdynamic="-rdynamic"
- DYLIB_EXTENSION="so"
- AC_DEFINE([HAVE_DISASSEMBLER], [1], [Using libopcodes])
-
- ;;
- *) AC_MSG_ERROR([$target_os target is not supported.]);;
-esac
-
-AC_CHECK_LIB(z, inflate, [], \
- [AC_MSG_ERROR([You need to install the zlib package (z).])]
-)
-
-AC_SUBST([rdynamic])
-AC_SUBST([LLVMDYLIB])
-AC_SUBST([DYLIB_EXTENSION])
-
-dnl **************************************************************************
-dnl VVM thread type
-dnl **************************************************************************
-AC_ARG_WITH(thread,
- [AS_HELP_STRING(--with-thread=something,
- [Thread type ('common' or 'no')])],
- [thread=$withval],[thread=common]
-)
-
-AS_IF([test "x$thread" != "xno"],
- [AC_CHECK_HEADER([pthread.h],,
- [AC_MSG_WARN(phtread include NOT found)])
- AC_CHECK_LIB(pthread, pthread_create, [],
- [AC_MSG_ERROR([pthread library not found])])
- ]
-)
-
-AM_CONDITIONAL([HAVE_PTHREAD], [test "x$thread" != "xno"])
-if test "x$thread" = xcommon; then
- AC_DEFINE([HAVE_PTHREAD], [1], [Using pthread library])
-fi
-
-GCTHREAD_LIBS="$PWD/lib/Mvm/CommonThread/libuvm_common_thread.a"
-AC_SUBST([GCTHREAD_LIBS])
-
-
-dnl **************************************************************************
-dnl Checks for typedefs, structures, and compiler characteristics.
-dnl **************************************************************************
-AC_C_CONST
-
-dnl **************************************************************************
-dnl
-dnl **************************************************************************
-AC_LIBTOOL_DLOPEN
-AM_PROG_LIBTOOL
-
-
-dnl **************************************************************************
-dnl VVM GC type
-dnl **************************************************************************
-AC_ARG_WITH(gc,
- [AS_HELP_STRING(--with-gc=something,
- [GC type ('single-mmap' 'multi-mmap' or 'boehm')])],
- [[gc=$withval]],
- [[ echo Using mmap2 as vvm gc type.
- gc=single-mmap
- ]]
-)
-
-dnl TODO find the libgc.a
-if test "x$gc" = "xboehm"; then
- AC_CHECK_LIB(gccpp, GC_malloc, [], \
- [AC_MSG_ERROR([You need to install the boehm-gc package (gccpp).])]
- )
- AC_CHECK_HEADER([gc/gc.h], [], \
- AC_MSG_ERROR([You need to install the boehm-gc devel package (gc/gc.h).])
- )
- GC_LIBS="-lgccpp -gc $PWD/lib/Mvm/BoehmGC/libuvm_gc_boehm.a"
- CFLAGS="$CFLAGS -I$PWD/lib/Mvm/BoehmGC -DGC_THREADS"
- CXXFLAGS="$CXXFLAGS -I$PWD/lib/Mvm/BoehmGC -DGC_THREADS"
- AC_DEFINE([USE_GC_BOEHM], [1], [Using the boehm gc])
- case $target_os in
- *linux*)
- CFLAGS="-DGC_LINUX_THREADS"
- CXXFLAGS="$CXXFLAGS -DGC_LINUX_THREADS"
- ;;
- esac
-else
- if test "x$gc" = "xmulti-mmap"; then
- CFLAGS="$CFLAGS -I$PWD/lib/Mvm/GCMmap2 -DWITH_TRACER -DMULTIPLE_GC"
- CXXFLAGS="$CXXFLAGS -I$PWD/lib/Mvm/GCMmap2 -DWITH_TRACER -DMULTIPLE_GC"
- fi
- GC_LIBS="$PWD/lib/Mvm/GCMmap2/libuvm_gc_mmap2.a \
- $PWD/lib/Mvm/Allocator/libuvm_alloc.a"
- CFLAGS="$CFLAGS -I$PWD/lib/Mvm/GCMmap2 -DWITH_TRACER"
- CXXFLAGS="$CXXFLAGS -I$PWD/lib/Mvm/GCMmap2 -DWITH_TRACER"
- AC_DEFINE([USE_GC_MMAP2], [1], [Using the gcmmap2])
-fi
-
-AC_SUBST([GC_LIBS])
-
-AM_CONDITIONAL([GC_BOEHM], [test "x$gc" = "xboehm"])
-AM_CONDITIONAL([GC_MULTI_MMAP], [test "x$gc" = "xmulti-mmap"])
-AM_CONDITIONAL([GC_SINGLE_MMAP], [test "x$gc" = "xsingle-mmap"])
-
-dnl **************************************************************************
-dnl Virtual Machine type
-dnl **************************************************************************
-AC_ARG_WITH(vm-type,
- [AS_HELP_STRING(--with-vm-type=something,
- [VM type ('single' 'multi' or 'service')])],
- [[vmtype=$withval]],
- [[ echo Using single as vm type.
- vmtype=single
- ]]
-)
-
-if test "x$vmtype" = "xmulti"; then
- CFLAGS="$CFLAGS -DMULTIPLE_VM"
- CXXFLAGS="$CXXFLAGS -DMULTIPLE_VM"
-else
- if test "x$vmtype" = "xservice"; then
- CFLAGS="$CFLAGS -DMULTIPLE_VM -DSERVICE_GC -DMULTIPLE_GC -DSERVICE_VM -I$PWD/lib/Mvm/Allocator"
- CXXFLAGS="$CXXFLAGS -DMULTIPLE_VM -DSERVICE_GC -DMULTIPLE_GC -DSERVICE_VM -I$PWD/lib/Mvm/Allocator"
- fi
-fi
-
-AM_CONDITIONAL([SERVICE_BUILD], [test "x$vmtype" = "xservice"])
-AM_CONDITIONAL([ISOLATE_BUILD], [test "x$vmtype" = "xmulti"])
-
-dnl **************************************************************************
-dnl GNU CLASSPATH version
-dnl **************************************************************************
-AC_ARG_WITH(gnu-classpath-version,
- [AS_HELP_STRING(--with-gnu-classpath-version=something,
- [GNU CLASSPATH VERSION (default is '0.97.2')])],
- [[gnuclasspathversion=$withval]],
- [[ echo Using '0.97.2' as GNU CLASSPATH version.
- gnuclasspathversion=0.97.2
- ]]
-)
-gnuclasspathversionuvm=`echo $gnuclasspathversion | $SED s/\\\./-/`
-AC_SUBST([gnuclasspathversion])
-AC_SUBST([gnuclasspathversionuvm])
-
-dnl **************************************************************************
-dnl GNU CLASSPATH installation prefix
-dnl **************************************************************************
-AC_ARG_WITH(gnu-classpath-local-prefix,
- [AS_HELP_STRING(--with-gnu-classpath-local-prefix=something,
- [GNU CLASSPATH local prefix (no default)])],
- [[gnuclasspathlocalprefix=$withval]],
- [[ echo Not using GNU CLASSPATH local prefix.
- gnuclasspathlocalprefix=''
- ]]
-)
-
-AC_ARG_WITH(gnu-classpath-installation-prefix,
- [AS_HELP_STRING(--with-gnu-classpath-installation-prefix=something,
- [GNU CLASSPATH installation prefix (default is '/usr/local/classpath')])],
- [[gnuclasspathinstallationprefix=$withval]],
- [[gnuclasspathinstallationprefix=/usr/local/classpath]]
-)
-
-if test "x${gnuclasspathlocalprefix}" = x; then
- echo Using ${gnuclasspathinstallationprefix} as GNU CLASSPATH installation prefix;
- classpathglibj=${gnuclasspathinstallationprefix}/share/classpath/glibj.zip;
- classpathlibs=${gnuclasspathinstallationprefix}/lib/classpath/;
- CFLAGS="$CFLAGS -I$gnuclasspathinstallationprefix/include"
- CXXFLAGS="$CXXFLAGS -I$gnuclasspathinstallationprefix/include"
-else
- echo Using ${gnuclasspathlocalprefix} as GNU CLASSPATH local prefix;
- classpathglibj=${gnuclasspathlocalprefix}/lib/;
- classpathlibs=${gnuclasspathlocalprefix}/lib/;
- CFLAGS="$CFLAGS -I$gnuclasspathlocalprefix/include"
- CXXFLAGS="$CXXFLAGS -I$gnuclasspathlocalprefix/include"
-fi
-
-
-AC_SUBST([classpathglibj])
-AC_SUBST([classpathlibs])
-
-dnl **************************************************************************
-dnl Local PNet directory
-dnl **************************************************************************
-AC_ARG_WITH(pnet-local-prefix,
- [AS_HELP_STRING(--with-pnet-local-prefix=something,
- [PNET local prefix (no default)])],
- [[pnetlocalprefix=$withval]],
- [[ echo Not using PNETlocal prefix.
- pnetlocalprefix=''
- ]]
-)
-
-AM_CONDITIONAL([WITH_N3], [test "x$pnetlocalprefix" != "x"])
-if test "x$pnetlocalprefix" != x; then
- echo Using ${pnetlocalprefix} as PNET local prefix;
- AC_DEFINE([WITH_N3], [1], [Compiling N3])
-fi
-
-AC_SUBST([pnetlocalprefix])
-
-
-
-AC_CONFIG_FILES([
- Makefile
- lib/N3/Makefile
- lib/N3/VMCore/Makefile
- lib/JnJVM/Makefile
- lib/JnJVM/Classpath/Makefile
- lib/JnJVM/VMCore/Makefile
- lib/JnJVM/LLVMRuntime/Makefile
- lib/JnJVM/Classpath/Classpath.h
- lib/Mvm/Makefile
- lib/Mvm/GCMmap2/Makefile
- lib/Mvm/BoehmGC/Makefile
- lib/Mvm/CommonThread/Makefile
- lib/Mvm/Allocator/Makefile
-])
-AC_OUTPUT
Added: vmkit/trunk/include/mvm/Config/config.h.in
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Config/config.h.in?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/include/mvm/Config/config.h.in (added)
+++ vmkit/trunk/include/mvm/Config/config.h.in Wed Jun 25 04:59:39 2008
@@ -0,0 +1,94 @@
+/* include/mvm/Config/config.h.in. Generated from autoconf/configure.ac by autoheader. */
+
+/* Define to 1 if the system has the type `int64_t'. */
+#undef HAVE_INT64_T
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `gc' library (-lgc). */
+#undef HAVE_LIBGC
+
+/* Define to 1 if you have the `pthread' library (-lpthread). */
+#undef HAVE_LIBPTHREAD
+
+/* Define to 1 if you have the `z' library (-lz). */
+#undef HAVE_LIBZ
+
+/* Define to 1 if you have the `longjmp' function. */
+#undef HAVE_LONGJMP
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Using pthread library */
+#undef HAVE_PTHREAD
+
+/* Define to 1 if you have the `setjmp' function. */
+#undef HAVE_SETJMP
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if the system has the type `uint64_t'. */
+#undef HAVE_UINT64_T
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if the system has the type `u_int64_t'. */
+#undef HAVE_U_INT64_T
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#undef RETSIGTYPE
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Using the boehm gc */
+#undef USE_GC_BOEHM
+
+/* Using the gcmmap2 */
+#undef USE_GC_MMAP2
+
+/* Compiling N3 */
+#undef WITH_N3
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
Modified: vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp Wed Jun 25 04:59:39 2008
@@ -11,18 +11,18 @@
#include "Classpath.h"
-#include "ClasspathConstructor.cpp"
-#include "ClasspathMethod.cpp"
-#include "ClasspathVMClass.cpp"
-#include "ClasspathVMClassLoader.cpp"
-#include "ClasspathVMField.cpp"
-#include "ClasspathVMObject.cpp"
-#include "ClasspathVMRuntime.cpp"
-#include "ClasspathVMStackWalker.cpp"
-#include "ClasspathVMSystem.cpp"
-#include "ClasspathVMSystemProperties.cpp"
-#include "ClasspathVMThread.cpp"
-#include "ClasspathVMThrowable.cpp"
+#include "ClasspathConstructor.cpp.inc"
+#include "ClasspathMethod.cpp.inc"
+#include "ClasspathVMClass.cpp.inc"
+#include "ClasspathVMClassLoader.cpp.inc"
+#include "ClasspathVMField.cpp.inc"
+#include "ClasspathVMObject.cpp.inc"
+#include "ClasspathVMRuntime.cpp.inc"
+#include "ClasspathVMStackWalker.cpp.inc"
+#include "ClasspathVMSystem.cpp.inc"
+#include "ClasspathVMSystemProperties.cpp.inc"
+#include "ClasspathVMThread.cpp.inc"
+#include "ClasspathVMThrowable.cpp.inc"
#include "JavaClass.h"
#include "Jnjvm.h"
Removed: vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp (removed)
@@ -1,110 +0,0 @@
-//===- ClasspathConstructor.cpp -------------------------------------------===//
-//===----------- GNU classpath java/lang/reflect/Constructor --------------===//
-//
-// JnJVM
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <string.h>
-
-#include "types.h"
-
-#include "JavaArray.h"
-#include "JavaClass.h"
-#include "JavaObject.h"
-#include "JavaTypes.h"
-#include "JavaThread.h"
-#include "JavaUpcalls.h"
-#include "Jnjvm.h"
-#include "NativeUtil.h"
-
-using namespace jnjvm;
-
-extern "C" {
-
-
-JNIEXPORT jobject JNICALL Java_java_lang_reflect_Constructor_getParameterTypes(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject cons) {
- JavaMethod* meth = (JavaMethod*)(Classpath::constructorSlot->getVirtualInt32Field((JavaObject*)cons));
- JavaObject* loader = meth->classDef->classLoader;
- return (jobject)(NativeUtil::getParameterTypes(loader, meth));
-}
-
-JNIEXPORT jint JNICALL Java_java_lang_reflect_Constructor_getModifiersInternal(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject cons) {
- JavaMethod* meth = (JavaMethod*)(Classpath::constructorSlot->getVirtualInt32Field((JavaObject*)cons));
- return meth->access;
-}
-
-JNIEXPORT jobject JNICALL Java_java_lang_reflect_Constructor_constructNative(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
- jobject _cons,
- jobject _args,
- jclass Clazz,
- jint _meth) {
- JavaMethod* meth = (JavaMethod*)_meth;
- JavaArray* args = (JavaArray*)_args;
- sint32 nbArgs = args ? args->size : 0;
- sint32 size = meth->getSignature()->args.size();
- Jnjvm* vm = JavaThread::get()->isolate;
-
- void** buf = (void**)alloca(size * sizeof(uint64));
- void* _buf = (void*)buf;
- sint32 index = 0;
- if (nbArgs == size) {
- CommonClass* _cl = NativeUtil::resolvedImplClass(Clazz, false);
- if (!_cl->isArray) {
- Class* cl = (Class*)_cl;
- cl->initialiseClass();
-
- JavaObject* res = cl->doNew(vm);
- JavaObject** ptr = (JavaObject**)(void*)(args->elements);
- for (std::vector<Typedef*>::iterator i = meth->getSignature()->args.begin(),
- e = meth->getSignature()->args.end(); i != e; ++i, ++index) {
- NativeUtil::decapsulePrimitive(vm, buf, ptr[index], *i);
- }
-
- JavaObject* excp = 0;
- try {
- meth->invokeIntSpecialBuf(vm, res, _buf);
- }catch(...) {
- excp = JavaThread::getJavaException();
- JavaThread::clearException();
- }
- if (excp) {
- if (excp->classOf->isAssignableFrom(Classpath::newException)) {
- JavaThread::get()->isolate->invocationTargetException(excp);
- } else {
- JavaThread::throwException(excp);
- }
- }
-
- return (jobject)res;
- }
- }
- vm->illegalArgumentExceptionForMethod(meth, 0, 0);
- return 0;
-}
-
-JNIEXPORT jobjectArray JNICALL Java_java_lang_reflect_Constructor_getExceptionTypes(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject cons) {
- verifyNull(cons);
- JavaMethod* meth = (JavaMethod*)Classpath::constructorSlot->getVirtualInt32Field((JavaObject*)cons);
- return (jobjectArray)NativeUtil::getExceptionTypes(meth);
-}
-
-}
Added: vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp.inc?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp.inc (added)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp.inc Wed Jun 25 04:59:39 2008
@@ -0,0 +1,110 @@
+//===- ClasspathConstructor.cpp -------------------------------------------===//
+//===----------- GNU classpath java/lang/reflect/Constructor --------------===//
+//
+// JnJVM
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <string.h>
+
+#include "types.h"
+
+#include "JavaArray.h"
+#include "JavaClass.h"
+#include "JavaObject.h"
+#include "JavaTypes.h"
+#include "JavaThread.h"
+#include "JavaUpcalls.h"
+#include "Jnjvm.h"
+#include "NativeUtil.h"
+
+using namespace jnjvm;
+
+extern "C" {
+
+
+JNIEXPORT jobject JNICALL Java_java_lang_reflect_Constructor_getParameterTypes(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject cons) {
+ JavaMethod* meth = (JavaMethod*)(Classpath::constructorSlot->getVirtualInt32Field((JavaObject*)cons));
+ JavaObject* loader = meth->classDef->classLoader;
+ return (jobject)(NativeUtil::getParameterTypes(loader, meth));
+}
+
+JNIEXPORT jint JNICALL Java_java_lang_reflect_Constructor_getModifiersInternal(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject cons) {
+ JavaMethod* meth = (JavaMethod*)(Classpath::constructorSlot->getVirtualInt32Field((JavaObject*)cons));
+ return meth->access;
+}
+
+JNIEXPORT jobject JNICALL Java_java_lang_reflect_Constructor_constructNative(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+ jobject _cons,
+ jobject _args,
+ jclass Clazz,
+ jint _meth) {
+ JavaMethod* meth = (JavaMethod*)_meth;
+ JavaArray* args = (JavaArray*)_args;
+ sint32 nbArgs = args ? args->size : 0;
+ sint32 size = meth->getSignature()->args.size();
+ Jnjvm* vm = JavaThread::get()->isolate;
+
+ void** buf = (void**)alloca(size * sizeof(uint64));
+ void* _buf = (void*)buf;
+ sint32 index = 0;
+ if (nbArgs == size) {
+ CommonClass* _cl = NativeUtil::resolvedImplClass(Clazz, false);
+ if (!_cl->isArray) {
+ Class* cl = (Class*)_cl;
+ cl->initialiseClass();
+
+ JavaObject* res = cl->doNew(vm);
+ JavaObject** ptr = (JavaObject**)(void*)(args->elements);
+ for (std::vector<Typedef*>::iterator i = meth->getSignature()->args.begin(),
+ e = meth->getSignature()->args.end(); i != e; ++i, ++index) {
+ NativeUtil::decapsulePrimitive(vm, buf, ptr[index], *i);
+ }
+
+ JavaObject* excp = 0;
+ try {
+ meth->invokeIntSpecialBuf(vm, res, _buf);
+ }catch(...) {
+ excp = JavaThread::getJavaException();
+ JavaThread::clearException();
+ }
+ if (excp) {
+ if (excp->classOf->isAssignableFrom(Classpath::newException)) {
+ JavaThread::get()->isolate->invocationTargetException(excp);
+ } else {
+ JavaThread::throwException(excp);
+ }
+ }
+
+ return (jobject)res;
+ }
+ }
+ vm->illegalArgumentExceptionForMethod(meth, 0, 0);
+ return 0;
+}
+
+JNIEXPORT jobjectArray JNICALL Java_java_lang_reflect_Constructor_getExceptionTypes(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject cons) {
+ verifyNull(cons);
+ JavaMethod* meth = (JavaMethod*)Classpath::constructorSlot->getVirtualInt32Field((JavaObject*)cons);
+ return (jobjectArray)NativeUtil::getExceptionTypes(meth);
+}
+
+}
Removed: vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp (removed)
@@ -1,193 +0,0 @@
-//===- ClasspathMethod.cpp ------------------------------------------------===//
-//===------------- GNU classpath java/lang/reflect/Method -----------------===//
-//
-// JnJVM
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <string.h>
-
-#include "types.h"
-
-#include "JavaArray.h"
-#include "JavaClass.h"
-#include "JavaObject.h"
-#include "JavaTypes.h"
-#include "JavaThread.h"
-#include "JavaUpcalls.h"
-#include "Jnjvm.h"
-#include "NativeUtil.h"
-
-using namespace jnjvm;
-
-extern "C" {
-
-JNIEXPORT jint JNICALL Java_java_lang_reflect_Method_getModifiersInternal(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
- jobject Meth) {
- JavaMethod* meth = (JavaMethod*)Classpath::methodSlot->getVirtualInt32Field((JavaObject*)Meth);
- return meth->access;
-}
-
-JNIEXPORT jclass JNICALL Java_java_lang_reflect_Method_getReturnType(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
- jobject Meth) {
- JavaMethod* meth = (JavaMethod*)Classpath::methodSlot->getVirtualInt32Field((JavaObject*)Meth);
- JavaObject* loader = meth->classDef->classLoader;
- return (jclass)NativeUtil::getClassType(loader, meth->getSignature()->ret);
-}
-
-
-JNIEXPORT jobject JNICALL Java_java_lang_reflect_Method_getParameterTypes(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-
- jobject Meth) {
- JavaMethod* meth = (JavaMethod*)Classpath::methodSlot->getVirtualInt32Field((JavaObject*)Meth);
- JavaObject* loader = meth->classDef->classLoader;
- return (jobject)(NativeUtil::getParameterTypes(loader, meth));
-}
-
-JNIEXPORT jobject JNICALL Java_java_lang_reflect_Method_invokeNative(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
- jobject Meth, jobject _obj, jobject _args, jclass Cl, jint _meth) {
-
- JavaMethod* meth = (JavaMethod*)_meth;
- JavaArray* args = (JavaArray*)_args;
- sint32 nbArgs = args ? args->size : 0;
- sint32 size = meth->getSignature()->args.size();
- Jnjvm* vm = JavaThread::get()->isolate;
- JavaObject* obj = (JavaObject*)_obj;
-
- void** buf = (void**)alloca(size * sizeof(uint64));
- void* _buf = (void*)buf;
- sint32 index = 0;
- if (nbArgs == size) {
- CommonClass* _cl = NativeUtil::resolvedImplClass(Cl, false);
- Class* cl = (Class*)_cl;
-
- if (isVirtual(meth->access)) {
- verifyNull(obj);
- if (!(obj->classOf->isAssignableFrom(meth->classDef))) {
- vm->illegalArgumentExceptionForMethod(meth, meth->classDef, obj->classOf);
- }
-
- } else {
- cl->initialiseClass();
- }
-
- JavaObject** ptr = (JavaObject**)(void*)(args->elements);
- for (std::vector<Typedef*>::iterator i = meth->getSignature()->args.begin(),
- e = meth->getSignature()->args.end(); i != e; ++i, ++index) {
- NativeUtil::decapsulePrimitive(vm, buf, ptr[index], *i);
- }
-
- JavaObject* exc = 0;
-
-#define RUN_METH(TYPE) \
- try{ \
- if (isVirtual(meth->access)) { \
- if (isPublic(meth->access)) { \
- val = meth->invoke##TYPE##VirtualBuf(vm, obj, _buf); \
- } else { \
- val = meth->invoke##TYPE##SpecialBuf(vm, obj, _buf); \
- } \
- } else { \
- val = meth->invoke##TYPE##StaticBuf(vm, _buf); \
- } \
- }catch(...) { \
- exc = JavaThread::getJavaException(); \
- assert(exc && "no exception?"); \
- JavaThread::clearException(); \
- } \
- \
- if (exc) { \
- if (exc->classOf->isAssignableFrom(Classpath::newException)) { \
- JavaThread::get()->isolate->invocationTargetException(exc); \
- } else { \
- JavaThread::throwException(exc); \
- } \
- } \
-
- JavaObject* res = 0;
- const AssessorDesc* retType = meth->getSignature()->ret->funcs;
- if (retType == AssessorDesc::dVoid) {
- res = 0;
- uint32 val = 0;
- RUN_METH(Int);
- } else if (retType == AssessorDesc::dBool) {
- uint32 val = 0;
- RUN_METH(Int);
- res = (*Classpath::boolClass)(vm);
- Classpath::boolValue->setVirtualInt8Field(res, val);
- } else if (retType == AssessorDesc::dByte) {
- uint32 val = 0;
- RUN_METH(Int);
- res = (*Classpath::byteClass)(vm);
- Classpath::byteValue->setVirtualInt8Field(res, val);
- } else if (retType == AssessorDesc::dChar) {
- uint32 val = 0;
- RUN_METH(Int);
- res = (*Classpath::charClass)(vm);
- Classpath::charValue->setVirtualInt16Field(res, val);
- } else if (retType == AssessorDesc::dShort) {
- uint32 val = 0;
- RUN_METH(Int);
- res = (*Classpath::shortClass)(vm);
- Classpath::shortValue->setVirtualInt16Field(res, val);
- } else if (retType == AssessorDesc::dInt) {
- uint32 val = 0;
- RUN_METH(Int);
- res = (*Classpath::intClass)(vm);
- Classpath::intValue->setVirtualInt32Field(res, val);
- } else if (retType == AssessorDesc::dLong) {
- sint64 val = 0;
- RUN_METH(Long);
- res = (*Classpath::longClass)(vm);
- Classpath::longValue->setVirtualLongField(res, val);
- } else if (retType == AssessorDesc::dFloat) {
- float val = 0;
- RUN_METH(Float);
- res = (*Classpath::floatClass)(vm);
- Classpath::floatValue->setVirtualFloatField(res, val);
- } else if (retType == AssessorDesc::dDouble) {
- double val = 0;
- RUN_METH(Double);
- res = (*Classpath::doubleClass)(vm);
- Classpath::doubleValue->setVirtualDoubleField(res, val);
- } else if (retType == AssessorDesc::dTab || retType == AssessorDesc::dRef) {
- JavaObject* val = 0;
- RUN_METH(JavaObject);
- res = val;
- } else {
- vm->unknownError("should not be here");
- }
- return (jobject)res;
- }
- vm->illegalArgumentExceptionForMethod(meth, 0, 0);
- return 0;
-}
-
-#undef RUN_METH
-
-JNIEXPORT jobjectArray JNICALL Java_java_lang_reflect_Method_getExceptionTypes(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
- jobject _meth) {
- verifyNull(_meth);
- JavaMethod* meth = (JavaMethod*)Classpath::methodSlot->getVirtualInt32Field((JavaObject*)_meth);
- return (jobjectArray)NativeUtil::getExceptionTypes(meth);
-}
-
-}
Added: vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp.inc?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp.inc (added)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp.inc Wed Jun 25 04:59:39 2008
@@ -0,0 +1,193 @@
+//===- ClasspathMethod.cpp ------------------------------------------------===//
+//===------------- GNU classpath java/lang/reflect/Method -----------------===//
+//
+// JnJVM
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <string.h>
+
+#include "types.h"
+
+#include "JavaArray.h"
+#include "JavaClass.h"
+#include "JavaObject.h"
+#include "JavaTypes.h"
+#include "JavaThread.h"
+#include "JavaUpcalls.h"
+#include "Jnjvm.h"
+#include "NativeUtil.h"
+
+using namespace jnjvm;
+
+extern "C" {
+
+JNIEXPORT jint JNICALL Java_java_lang_reflect_Method_getModifiersInternal(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+ jobject Meth) {
+ JavaMethod* meth = (JavaMethod*)Classpath::methodSlot->getVirtualInt32Field((JavaObject*)Meth);
+ return meth->access;
+}
+
+JNIEXPORT jclass JNICALL Java_java_lang_reflect_Method_getReturnType(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+ jobject Meth) {
+ JavaMethod* meth = (JavaMethod*)Classpath::methodSlot->getVirtualInt32Field((JavaObject*)Meth);
+ JavaObject* loader = meth->classDef->classLoader;
+ return (jclass)NativeUtil::getClassType(loader, meth->getSignature()->ret);
+}
+
+
+JNIEXPORT jobject JNICALL Java_java_lang_reflect_Method_getParameterTypes(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+
+ jobject Meth) {
+ JavaMethod* meth = (JavaMethod*)Classpath::methodSlot->getVirtualInt32Field((JavaObject*)Meth);
+ JavaObject* loader = meth->classDef->classLoader;
+ return (jobject)(NativeUtil::getParameterTypes(loader, meth));
+}
+
+JNIEXPORT jobject JNICALL Java_java_lang_reflect_Method_invokeNative(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+ jobject Meth, jobject _obj, jobject _args, jclass Cl, jint _meth) {
+
+ JavaMethod* meth = (JavaMethod*)_meth;
+ JavaArray* args = (JavaArray*)_args;
+ sint32 nbArgs = args ? args->size : 0;
+ sint32 size = meth->getSignature()->args.size();
+ Jnjvm* vm = JavaThread::get()->isolate;
+ JavaObject* obj = (JavaObject*)_obj;
+
+ void** buf = (void**)alloca(size * sizeof(uint64));
+ void* _buf = (void*)buf;
+ sint32 index = 0;
+ if (nbArgs == size) {
+ CommonClass* _cl = NativeUtil::resolvedImplClass(Cl, false);
+ Class* cl = (Class*)_cl;
+
+ if (isVirtual(meth->access)) {
+ verifyNull(obj);
+ if (!(obj->classOf->isAssignableFrom(meth->classDef))) {
+ vm->illegalArgumentExceptionForMethod(meth, meth->classDef, obj->classOf);
+ }
+
+ } else {
+ cl->initialiseClass();
+ }
+
+ JavaObject** ptr = (JavaObject**)(void*)(args->elements);
+ for (std::vector<Typedef*>::iterator i = meth->getSignature()->args.begin(),
+ e = meth->getSignature()->args.end(); i != e; ++i, ++index) {
+ NativeUtil::decapsulePrimitive(vm, buf, ptr[index], *i);
+ }
+
+ JavaObject* exc = 0;
+
+#define RUN_METH(TYPE) \
+ try{ \
+ if (isVirtual(meth->access)) { \
+ if (isPublic(meth->access)) { \
+ val = meth->invoke##TYPE##VirtualBuf(vm, obj, _buf); \
+ } else { \
+ val = meth->invoke##TYPE##SpecialBuf(vm, obj, _buf); \
+ } \
+ } else { \
+ val = meth->invoke##TYPE##StaticBuf(vm, _buf); \
+ } \
+ }catch(...) { \
+ exc = JavaThread::getJavaException(); \
+ assert(exc && "no exception?"); \
+ JavaThread::clearException(); \
+ } \
+ \
+ if (exc) { \
+ if (exc->classOf->isAssignableFrom(Classpath::newException)) { \
+ JavaThread::get()->isolate->invocationTargetException(exc); \
+ } else { \
+ JavaThread::throwException(exc); \
+ } \
+ } \
+
+ JavaObject* res = 0;
+ const AssessorDesc* retType = meth->getSignature()->ret->funcs;
+ if (retType == AssessorDesc::dVoid) {
+ res = 0;
+ uint32 val = 0;
+ RUN_METH(Int);
+ } else if (retType == AssessorDesc::dBool) {
+ uint32 val = 0;
+ RUN_METH(Int);
+ res = (*Classpath::boolClass)(vm);
+ Classpath::boolValue->setVirtualInt8Field(res, val);
+ } else if (retType == AssessorDesc::dByte) {
+ uint32 val = 0;
+ RUN_METH(Int);
+ res = (*Classpath::byteClass)(vm);
+ Classpath::byteValue->setVirtualInt8Field(res, val);
+ } else if (retType == AssessorDesc::dChar) {
+ uint32 val = 0;
+ RUN_METH(Int);
+ res = (*Classpath::charClass)(vm);
+ Classpath::charValue->setVirtualInt16Field(res, val);
+ } else if (retType == AssessorDesc::dShort) {
+ uint32 val = 0;
+ RUN_METH(Int);
+ res = (*Classpath::shortClass)(vm);
+ Classpath::shortValue->setVirtualInt16Field(res, val);
+ } else if (retType == AssessorDesc::dInt) {
+ uint32 val = 0;
+ RUN_METH(Int);
+ res = (*Classpath::intClass)(vm);
+ Classpath::intValue->setVirtualInt32Field(res, val);
+ } else if (retType == AssessorDesc::dLong) {
+ sint64 val = 0;
+ RUN_METH(Long);
+ res = (*Classpath::longClass)(vm);
+ Classpath::longValue->setVirtualLongField(res, val);
+ } else if (retType == AssessorDesc::dFloat) {
+ float val = 0;
+ RUN_METH(Float);
+ res = (*Classpath::floatClass)(vm);
+ Classpath::floatValue->setVirtualFloatField(res, val);
+ } else if (retType == AssessorDesc::dDouble) {
+ double val = 0;
+ RUN_METH(Double);
+ res = (*Classpath::doubleClass)(vm);
+ Classpath::doubleValue->setVirtualDoubleField(res, val);
+ } else if (retType == AssessorDesc::dTab || retType == AssessorDesc::dRef) {
+ JavaObject* val = 0;
+ RUN_METH(JavaObject);
+ res = val;
+ } else {
+ vm->unknownError("should not be here");
+ }
+ return (jobject)res;
+ }
+ vm->illegalArgumentExceptionForMethod(meth, 0, 0);
+ return 0;
+}
+
+#undef RUN_METH
+
+JNIEXPORT jobjectArray JNICALL Java_java_lang_reflect_Method_getExceptionTypes(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+ jobject _meth) {
+ verifyNull(_meth);
+ JavaMethod* meth = (JavaMethod*)Classpath::methodSlot->getVirtualInt32Field((JavaObject*)_meth);
+ return (jobjectArray)NativeUtil::getExceptionTypes(meth);
+}
+
+}
Removed: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp (removed)
@@ -1,431 +0,0 @@
-//===---- ClasspathVMClass.cpp - GNU classpath java/lang/VMClass ----------===//
-//
-// JnJVM
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <string.h>
-
-#include "types.h"
-
-#include "JavaAccess.h"
-#include "JavaArray.h"
-#include "JavaClass.h"
-#include "JavaConstantPool.h"
-#include "JavaObject.h"
-#include "JavaString.h"
-#include "JavaTypes.h"
-#include "JavaThread.h"
-#include "JavaUpcalls.h"
-#include "Jnjvm.h"
-#include "NativeUtil.h"
-#include "Reader.h"
-
-using namespace jnjvm;
-
-extern "C" {
-
-JNIEXPORT jboolean JNICALL Java_java_lang_VMClass_isArray(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jobject klass) {
-
- CommonClass* cl =
- (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)klass);
-
- return cl->isArray;
-
-}
-
-JNIEXPORT jclass JNICALL Java_java_lang_VMClass_forName(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-
- jobject str,
- jboolean clinit,
- jobject loader) {
-
- Jnjvm* vm = JavaThread::get()->isolate;
- CommonClass* cl = vm->lookupClassFromJavaString((JavaString*)str,
- (JavaObject*)loader, true,
- false, false);
- if (cl != 0) {
- if (clinit) {
- cl->initialiseClass();
- }
- return (jclass)(cl->getClassDelegatee());
- } else {
- vm->error(Jnjvm::ClassNotFoundException, "unable to load %s",
- ((JavaString*)str)->strToAsciiz());
- return 0;
- }
-}
-
-JNIEXPORT jobject JNICALL Java_java_lang_VMClass_getDeclaredConstructors(
-#ifdef NATIVE_JNI
-JNIEnv *env,
- jclass clazz,
-#endif
-
- jclass Cl,
- jboolean publicOnly) {
-
- CommonClass* cl = NativeUtil::resolvedImplClass(Cl, false);
- Jnjvm* vm = JavaThread::get()->isolate;
-
- if (cl->isArray || isInterface(cl->access)) {
- return (jobject)ArrayObject::acons(0, Classpath::constructorArrayClass, vm);
- } else {
- CommonClass::method_map meths = cl->virtualMethods;
- std::vector<JavaMethod*> res;
- for (CommonClass::method_iterator i = meths.begin(), e = meths.end();
- i != e; ++i) {
- JavaMethod* meth = i->second;
- if (meth->name == Jnjvm::initName && (!publicOnly || isPublic(meth->access))) {
- res.push_back(meth);
- }
- }
-
- ArrayObject* ret = ArrayObject::acons(res.size(), Classpath::constructorArrayClass, vm);
- sint32 index = 0;
- for (std::vector<JavaMethod*>::iterator i = res.begin(), e = res.end();
- i != e; ++i, ++index) {
- JavaMethod* meth = *i;
- // TODO: check parameter types
- JavaObject* tmp = (*Classpath::newConstructor)(vm);
- Classpath::initConstructor->invokeIntSpecial(vm, tmp, Cl, meth);
- ret->elements[index] = tmp;
- }
- return (jobject)ret;
- }
-}
-
-JNIEXPORT jobject JNICALL Java_java_lang_VMClass_getDeclaredMethods(
-#ifdef NATIVE_JNI
-JNIEnv *env,
- jclass clazz,
-#endif
-
- jclass Cl,
- jboolean publicOnly) {
-
- Jnjvm* vm = JavaThread::get()->isolate;
- CommonClass* cl = NativeUtil::resolvedImplClass(Cl, false);
-
- if (cl->isArray) {
- return (jobject)ArrayObject::acons(0, Classpath::methodArrayClass, vm);
- } else {
- CommonClass::method_map meths = cl->virtualMethods;
- std::vector<JavaMethod*> res;
- for (CommonClass::method_iterator i = meths.begin(), e = meths.end();
- i != e; ++i) {
- JavaMethod* meth = i->second;
- if (meth->name != Jnjvm::initName && (!publicOnly || isPublic(meth->access))) {
- res.push_back(meth);
- }
- }
- meths = cl->staticMethods;
- for (CommonClass::method_iterator i = meths.begin(), e = meths.end();
- i != e; ++i) {
- JavaMethod* meth = i->second;
- if (meth->name != Jnjvm::clinitName && (!publicOnly || isPublic(meth->access))) {
- res.push_back(meth);
- }
- }
-
- ArrayObject* ret = ArrayObject::acons(res.size(), Classpath::methodArrayClass, vm);
- sint32 index = 0;
- for (std::vector<JavaMethod*>::iterator i = res.begin(), e = res.end();
- i != e; ++i, ++index) {
- JavaMethod* meth = *i;
- // TODO: check parameter types
- JavaObject* tmp = (*Classpath::newMethod)(vm);
- Classpath::initMethod->invokeIntSpecial(vm, tmp, Cl,
- vm->UTF8ToStr(meth->name), meth);
- ret->elements[index] = tmp;
- }
- return (jobject)ret;
- }
-}
-
-JNIEXPORT jint JNICALL Java_java_lang_VMClass_getModifiers(
-#ifdef NATIVE_JNI
-JNIEnv *env,
- jclass clazz,
-#endif
- jclass Cl,
- jboolean ignore) {
-
- CommonClass* cl = NativeUtil::resolvedImplClass(Cl, false);
- return cl->access;
-}
-
-JNIEXPORT jobject JNICALL Java_java_lang_VMClass_getName(
-#ifdef NATIVE_JNI
-JNIEnv *env,
- jclass clazz,
-#endif
- jobject Cl) {
- Jnjvm* vm = JavaThread::get()->isolate;
- CommonClass* cl =
- (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl);
-
- const UTF8* iname = cl->name;
- const UTF8* res = iname->internalToJava(vm, 0, iname->size);
-
- return (jobject)(vm->UTF8ToStr(res));
-}
-
-JNIEXPORT jboolean JNICALL Java_java_lang_VMClass_isPrimitive(
-#ifdef NATIVE_JNI
-JNIEnv *env,
- jclass clazz,
-#endif
- jclass Cl) {
- CommonClass* cl =
- (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl);
-
- return cl->isPrimitive;
-}
-
-JNIEXPORT jboolean JNICALL Java_java_lang_VMClass_isInterface(
-#ifdef NATIVE_JNI
-JNIEnv *env,
- jclass clazz,
-#endif
- jclass Cl) {
- CommonClass* cl = NativeUtil::resolvedImplClass(Cl, false);
-
- return isInterface(cl->access);
-}
-
-JNIEXPORT jclass JNICALL Java_java_lang_VMClass_getComponentType(
-#ifdef NATIVE_JNI
-JNIEnv *env,
- jclass clazz,
-#endif
- jclass Cl) {
- CommonClass* cl =
- (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl);
-
- if (cl->isArray) {
- CommonClass* bc = ((ClassArray*)cl)->baseClass();
- return (jclass)(bc->getClassDelegatee());
- } else {
- return 0;
- }
-}
-
-JNIEXPORT jobject JNICALL Java_java_lang_VMClass_getClassLoader(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jclass Cl) {
- CommonClass* cl =
- (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl);
- return (jobject)cl->classLoader;
-}
-
-JNIEXPORT jboolean JNICALL Java_java_lang_VMClass_isAssignableFrom(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jclass Cl1, jclass Cl2) {
- CommonClass* cl1 =
- (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl1);
- CommonClass* cl2 =
- (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl2);
-
- cl2->resolveClass(false);
- return cl2->isAssignableFrom(cl1);
-
-}
-
-JNIEXPORT jobject JNICALL Java_java_lang_VMClass_getSuperclass(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jclass Cl) {
- CommonClass* cl =
- (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl);
- if (isInterface(cl->access))
- return 0;
- else {
- cl->resolveClass(false);
- if (cl->super) return (jobject)JavaThread::get()->isolate->getClassDelegatee(cl->super);
- else return 0;
- }
-}
-
-JNIEXPORT bool JNICALL Java_java_lang_VMClass_isInstance(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jclass Cl, jobject obj) {
- CommonClass* cl =
- (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl);
- return ((JavaObject*)obj)->instanceOf(cl);
-}
-
-JNIEXPORT jobject JNICALL Java_java_lang_VMClass_getDeclaredFields(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jclass Cl, jboolean publicOnly) {
- Jnjvm* vm = JavaThread::get()->isolate;
- CommonClass* cl = NativeUtil::resolvedImplClass(Cl, false);
-
- if (cl->isArray) {
- return (jobject)ArrayObject::acons(0, Classpath::fieldArrayClass, vm);
- } else {
- CommonClass::field_map fields = cl->virtualFields;
- std::vector<JavaField*> res;
- for (CommonClass::field_iterator i = fields.begin(), e = fields.end();
- i != e; ++i) {
- JavaField* field = i->second;
- if (!publicOnly || isPublic(field->access)) {
- res.push_back(field);
- }
- }
- fields = cl->staticFields;
- for (CommonClass::field_iterator i = fields.begin(), e = fields.end();
- i != e; ++i) {
- JavaField* field = i->second;
- if (!publicOnly || isPublic(field->access)) {
- res.push_back(field);
- }
- }
-
- ArrayObject* ret = ArrayObject::acons(res.size(),
- Classpath::fieldArrayClass, vm);
- sint32 index = 0;
- for (std::vector<JavaField*>::iterator i = res.begin(), e = res.end();
- i != e; ++i, ++index) {
- JavaField* field = *i;
- // TODO: check parameter types
- JavaObject* tmp = (*Classpath::newField)(vm);
- Classpath::initField->invokeIntSpecial(vm, tmp, Cl,
- vm->UTF8ToStr(field->name), field);
- ret->elements[index] = tmp;
- }
- return (jobject)ret;
- }
-}
-
-JNIEXPORT jobject JNICALL Java_java_lang_VMClass_getInterfaces(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jclass Cl) {
- Jnjvm* vm = JavaThread::get()->isolate;
- CommonClass* cl = NativeUtil::resolvedImplClass(Cl, false);
- std::vector<Class*> & interfaces = cl->interfaces;
- ArrayObject* ret = ArrayObject::acons(interfaces.size(), Classpath::classArrayClass, vm);
- sint32 index = 0;
- for (std::vector<Class*>::iterator i = interfaces.begin(), e = interfaces.end();
- i != e; ++i, ++index) {
- Class* klass = *i;
- ret->elements[index] = vm->getClassDelegatee(klass);
- }
- return (jobject)ret;
-}
-
-static void resolveInnerOuterClasses(Class* cl) {
- Attribut* attribut = cl->lookupAttribut(Attribut::innerClassesAttribut);
- if (attribut != 0) {
- Reader reader(attribut, cl->bytes);
-
- uint16 nbi = reader.readU2();
- for (uint16 i = 0; i < nbi; ++i) {
- uint16 inner = reader.readU2();
- uint16 outer = reader.readU2();
- //uint16 innerName =
- reader.readU2();
- uint16 accessFlags = reader.readU2();
- Class* clInner = (Class*)cl->ctpInfo->loadClass(inner);
- Class* clOuter = (Class*)cl->ctpInfo->loadClass(outer);
-
- if (clInner == cl) {
- cl->outerClass = clOuter;
- } else if (clOuter == cl) {
- clInner->innerAccess = accessFlags;
- cl->innerClasses.push_back(clInner);
- }
- }
- }
- cl->innerOuterResolved = true;
-}
-
-
-JNIEXPORT jclass JNICALL Java_java_lang_VMClass_getDeclaringClass(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jclass Cl) {
- Jnjvm* vm = JavaThread::get()->isolate;
- Class* cl = (Class*)NativeUtil::resolvedImplClass(Cl, false);
- if (!(cl->innerOuterResolved))
- resolveInnerOuterClasses(cl);
- if (cl->outerClass) {
- return (jclass)vm->getClassDelegatee(cl->outerClass);
- } else {
- return 0;
- }
-}
-
-JNIEXPORT jobject JNICALL Java_java_lang_VMClass_getDeclaredClasses(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jclass Cl, bool publicOnly) {
- Jnjvm* vm = JavaThread::get()->isolate;
- Class* cl = (Class*)NativeUtil::resolvedImplClass(Cl, false);
- if (!(cl->innerOuterResolved))
- resolveInnerOuterClasses(cl);
- ArrayObject* res = ArrayObject::acons(cl->innerClasses.size(), Classpath::constructorArrayClass, vm);
- uint32 index = 0;
- for (std::vector<Class*>::iterator i = cl->innerClasses.begin(),
- e = cl->innerClasses.end(); i!= e; i++) {
- res->elements[index++] = vm->getClassDelegatee(*i);
- }
-
- return (jobject)res;
-}
-
-
-JNIEXPORT void JNICALL Java_java_lang_VMClass_throwException(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jobject throwable) {
- JavaThread::throwException((JavaObject*)throwable);
-}
-
-JNIEXPORT jobjectArray Java_java_lang_VMClass_getDeclaredAnnotations(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jclass Cl) {
- // TODO implement me
- Jnjvm* vm = JavaThread::get()->isolate;
- ArrayObject* res = ArrayObject::acons(0, Classpath::constructorArrayAnnotation, vm);
- return (jobjectArray)res;
-}
-}
Added: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp.inc?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp.inc (added)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp.inc Wed Jun 25 04:59:39 2008
@@ -0,0 +1,431 @@
+//===---- ClasspathVMClass.cpp - GNU classpath java/lang/VMClass ----------===//
+//
+// JnJVM
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <string.h>
+
+#include "types.h"
+
+#include "JavaAccess.h"
+#include "JavaArray.h"
+#include "JavaClass.h"
+#include "JavaConstantPool.h"
+#include "JavaObject.h"
+#include "JavaString.h"
+#include "JavaTypes.h"
+#include "JavaThread.h"
+#include "JavaUpcalls.h"
+#include "Jnjvm.h"
+#include "NativeUtil.h"
+#include "Reader.h"
+
+using namespace jnjvm;
+
+extern "C" {
+
+JNIEXPORT jboolean JNICALL Java_java_lang_VMClass_isArray(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jobject klass) {
+
+ CommonClass* cl =
+ (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)klass);
+
+ return cl->isArray;
+
+}
+
+JNIEXPORT jclass JNICALL Java_java_lang_VMClass_forName(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+
+ jobject str,
+ jboolean clinit,
+ jobject loader) {
+
+ Jnjvm* vm = JavaThread::get()->isolate;
+ CommonClass* cl = vm->lookupClassFromJavaString((JavaString*)str,
+ (JavaObject*)loader, true,
+ false, false);
+ if (cl != 0) {
+ if (clinit) {
+ cl->initialiseClass();
+ }
+ return (jclass)(cl->getClassDelegatee());
+ } else {
+ vm->error(Jnjvm::ClassNotFoundException, "unable to load %s",
+ ((JavaString*)str)->strToAsciiz());
+ return 0;
+ }
+}
+
+JNIEXPORT jobject JNICALL Java_java_lang_VMClass_getDeclaredConstructors(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+ jclass clazz,
+#endif
+
+ jclass Cl,
+ jboolean publicOnly) {
+
+ CommonClass* cl = NativeUtil::resolvedImplClass(Cl, false);
+ Jnjvm* vm = JavaThread::get()->isolate;
+
+ if (cl->isArray || isInterface(cl->access)) {
+ return (jobject)ArrayObject::acons(0, Classpath::constructorArrayClass, vm);
+ } else {
+ CommonClass::method_map meths = cl->virtualMethods;
+ std::vector<JavaMethod*> res;
+ for (CommonClass::method_iterator i = meths.begin(), e = meths.end();
+ i != e; ++i) {
+ JavaMethod* meth = i->second;
+ if (meth->name == Jnjvm::initName && (!publicOnly || isPublic(meth->access))) {
+ res.push_back(meth);
+ }
+ }
+
+ ArrayObject* ret = ArrayObject::acons(res.size(), Classpath::constructorArrayClass, vm);
+ sint32 index = 0;
+ for (std::vector<JavaMethod*>::iterator i = res.begin(), e = res.end();
+ i != e; ++i, ++index) {
+ JavaMethod* meth = *i;
+ // TODO: check parameter types
+ JavaObject* tmp = (*Classpath::newConstructor)(vm);
+ Classpath::initConstructor->invokeIntSpecial(vm, tmp, Cl, meth);
+ ret->elements[index] = tmp;
+ }
+ return (jobject)ret;
+ }
+}
+
+JNIEXPORT jobject JNICALL Java_java_lang_VMClass_getDeclaredMethods(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+ jclass clazz,
+#endif
+
+ jclass Cl,
+ jboolean publicOnly) {
+
+ Jnjvm* vm = JavaThread::get()->isolate;
+ CommonClass* cl = NativeUtil::resolvedImplClass(Cl, false);
+
+ if (cl->isArray) {
+ return (jobject)ArrayObject::acons(0, Classpath::methodArrayClass, vm);
+ } else {
+ CommonClass::method_map meths = cl->virtualMethods;
+ std::vector<JavaMethod*> res;
+ for (CommonClass::method_iterator i = meths.begin(), e = meths.end();
+ i != e; ++i) {
+ JavaMethod* meth = i->second;
+ if (meth->name != Jnjvm::initName && (!publicOnly || isPublic(meth->access))) {
+ res.push_back(meth);
+ }
+ }
+ meths = cl->staticMethods;
+ for (CommonClass::method_iterator i = meths.begin(), e = meths.end();
+ i != e; ++i) {
+ JavaMethod* meth = i->second;
+ if (meth->name != Jnjvm::clinitName && (!publicOnly || isPublic(meth->access))) {
+ res.push_back(meth);
+ }
+ }
+
+ ArrayObject* ret = ArrayObject::acons(res.size(), Classpath::methodArrayClass, vm);
+ sint32 index = 0;
+ for (std::vector<JavaMethod*>::iterator i = res.begin(), e = res.end();
+ i != e; ++i, ++index) {
+ JavaMethod* meth = *i;
+ // TODO: check parameter types
+ JavaObject* tmp = (*Classpath::newMethod)(vm);
+ Classpath::initMethod->invokeIntSpecial(vm, tmp, Cl,
+ vm->UTF8ToStr(meth->name), meth);
+ ret->elements[index] = tmp;
+ }
+ return (jobject)ret;
+ }
+}
+
+JNIEXPORT jint JNICALL Java_java_lang_VMClass_getModifiers(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+ jclass clazz,
+#endif
+ jclass Cl,
+ jboolean ignore) {
+
+ CommonClass* cl = NativeUtil::resolvedImplClass(Cl, false);
+ return cl->access;
+}
+
+JNIEXPORT jobject JNICALL Java_java_lang_VMClass_getName(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+ jclass clazz,
+#endif
+ jobject Cl) {
+ Jnjvm* vm = JavaThread::get()->isolate;
+ CommonClass* cl =
+ (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl);
+
+ const UTF8* iname = cl->name;
+ const UTF8* res = iname->internalToJava(vm, 0, iname->size);
+
+ return (jobject)(vm->UTF8ToStr(res));
+}
+
+JNIEXPORT jboolean JNICALL Java_java_lang_VMClass_isPrimitive(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+ jclass clazz,
+#endif
+ jclass Cl) {
+ CommonClass* cl =
+ (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl);
+
+ return cl->isPrimitive;
+}
+
+JNIEXPORT jboolean JNICALL Java_java_lang_VMClass_isInterface(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+ jclass clazz,
+#endif
+ jclass Cl) {
+ CommonClass* cl = NativeUtil::resolvedImplClass(Cl, false);
+
+ return isInterface(cl->access);
+}
+
+JNIEXPORT jclass JNICALL Java_java_lang_VMClass_getComponentType(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+ jclass clazz,
+#endif
+ jclass Cl) {
+ CommonClass* cl =
+ (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl);
+
+ if (cl->isArray) {
+ CommonClass* bc = ((ClassArray*)cl)->baseClass();
+ return (jclass)(bc->getClassDelegatee());
+ } else {
+ return 0;
+ }
+}
+
+JNIEXPORT jobject JNICALL Java_java_lang_VMClass_getClassLoader(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jclass Cl) {
+ CommonClass* cl =
+ (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl);
+ return (jobject)cl->classLoader;
+}
+
+JNIEXPORT jboolean JNICALL Java_java_lang_VMClass_isAssignableFrom(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jclass Cl1, jclass Cl2) {
+ CommonClass* cl1 =
+ (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl1);
+ CommonClass* cl2 =
+ (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl2);
+
+ cl2->resolveClass(false);
+ return cl2->isAssignableFrom(cl1);
+
+}
+
+JNIEXPORT jobject JNICALL Java_java_lang_VMClass_getSuperclass(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jclass Cl) {
+ CommonClass* cl =
+ (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl);
+ if (isInterface(cl->access))
+ return 0;
+ else {
+ cl->resolveClass(false);
+ if (cl->super) return (jobject)JavaThread::get()->isolate->getClassDelegatee(cl->super);
+ else return 0;
+ }
+}
+
+JNIEXPORT bool JNICALL Java_java_lang_VMClass_isInstance(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jclass Cl, jobject obj) {
+ CommonClass* cl =
+ (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl);
+ return ((JavaObject*)obj)->instanceOf(cl);
+}
+
+JNIEXPORT jobject JNICALL Java_java_lang_VMClass_getDeclaredFields(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jclass Cl, jboolean publicOnly) {
+ Jnjvm* vm = JavaThread::get()->isolate;
+ CommonClass* cl = NativeUtil::resolvedImplClass(Cl, false);
+
+ if (cl->isArray) {
+ return (jobject)ArrayObject::acons(0, Classpath::fieldArrayClass, vm);
+ } else {
+ CommonClass::field_map fields = cl->virtualFields;
+ std::vector<JavaField*> res;
+ for (CommonClass::field_iterator i = fields.begin(), e = fields.end();
+ i != e; ++i) {
+ JavaField* field = i->second;
+ if (!publicOnly || isPublic(field->access)) {
+ res.push_back(field);
+ }
+ }
+ fields = cl->staticFields;
+ for (CommonClass::field_iterator i = fields.begin(), e = fields.end();
+ i != e; ++i) {
+ JavaField* field = i->second;
+ if (!publicOnly || isPublic(field->access)) {
+ res.push_back(field);
+ }
+ }
+
+ ArrayObject* ret = ArrayObject::acons(res.size(),
+ Classpath::fieldArrayClass, vm);
+ sint32 index = 0;
+ for (std::vector<JavaField*>::iterator i = res.begin(), e = res.end();
+ i != e; ++i, ++index) {
+ JavaField* field = *i;
+ // TODO: check parameter types
+ JavaObject* tmp = (*Classpath::newField)(vm);
+ Classpath::initField->invokeIntSpecial(vm, tmp, Cl,
+ vm->UTF8ToStr(field->name), field);
+ ret->elements[index] = tmp;
+ }
+ return (jobject)ret;
+ }
+}
+
+JNIEXPORT jobject JNICALL Java_java_lang_VMClass_getInterfaces(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jclass Cl) {
+ Jnjvm* vm = JavaThread::get()->isolate;
+ CommonClass* cl = NativeUtil::resolvedImplClass(Cl, false);
+ std::vector<Class*> & interfaces = cl->interfaces;
+ ArrayObject* ret = ArrayObject::acons(interfaces.size(), Classpath::classArrayClass, vm);
+ sint32 index = 0;
+ for (std::vector<Class*>::iterator i = interfaces.begin(), e = interfaces.end();
+ i != e; ++i, ++index) {
+ Class* klass = *i;
+ ret->elements[index] = vm->getClassDelegatee(klass);
+ }
+ return (jobject)ret;
+}
+
+static void resolveInnerOuterClasses(Class* cl) {
+ Attribut* attribut = cl->lookupAttribut(Attribut::innerClassesAttribut);
+ if (attribut != 0) {
+ Reader reader(attribut, cl->bytes);
+
+ uint16 nbi = reader.readU2();
+ for (uint16 i = 0; i < nbi; ++i) {
+ uint16 inner = reader.readU2();
+ uint16 outer = reader.readU2();
+ //uint16 innerName =
+ reader.readU2();
+ uint16 accessFlags = reader.readU2();
+ Class* clInner = (Class*)cl->ctpInfo->loadClass(inner);
+ Class* clOuter = (Class*)cl->ctpInfo->loadClass(outer);
+
+ if (clInner == cl) {
+ cl->outerClass = clOuter;
+ } else if (clOuter == cl) {
+ clInner->innerAccess = accessFlags;
+ cl->innerClasses.push_back(clInner);
+ }
+ }
+ }
+ cl->innerOuterResolved = true;
+}
+
+
+JNIEXPORT jclass JNICALL Java_java_lang_VMClass_getDeclaringClass(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jclass Cl) {
+ Jnjvm* vm = JavaThread::get()->isolate;
+ Class* cl = (Class*)NativeUtil::resolvedImplClass(Cl, false);
+ if (!(cl->innerOuterResolved))
+ resolveInnerOuterClasses(cl);
+ if (cl->outerClass) {
+ return (jclass)vm->getClassDelegatee(cl->outerClass);
+ } else {
+ return 0;
+ }
+}
+
+JNIEXPORT jobject JNICALL Java_java_lang_VMClass_getDeclaredClasses(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jclass Cl, bool publicOnly) {
+ Jnjvm* vm = JavaThread::get()->isolate;
+ Class* cl = (Class*)NativeUtil::resolvedImplClass(Cl, false);
+ if (!(cl->innerOuterResolved))
+ resolveInnerOuterClasses(cl);
+ ArrayObject* res = ArrayObject::acons(cl->innerClasses.size(), Classpath::constructorArrayClass, vm);
+ uint32 index = 0;
+ for (std::vector<Class*>::iterator i = cl->innerClasses.begin(),
+ e = cl->innerClasses.end(); i!= e; i++) {
+ res->elements[index++] = vm->getClassDelegatee(*i);
+ }
+
+ return (jobject)res;
+}
+
+
+JNIEXPORT void JNICALL Java_java_lang_VMClass_throwException(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jobject throwable) {
+ JavaThread::throwException((JavaObject*)throwable);
+}
+
+JNIEXPORT jobjectArray Java_java_lang_VMClass_getDeclaredAnnotations(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jclass Cl) {
+ // TODO implement me
+ Jnjvm* vm = JavaThread::get()->isolate;
+ ArrayObject* res = ArrayObject::acons(0, Classpath::constructorArrayAnnotation, vm);
+ return (jobjectArray)res;
+}
+}
Removed: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClassLoader.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClassLoader.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClassLoader.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClassLoader.cpp (removed)
@@ -1,122 +0,0 @@
-//===- ClasspathVMClassLoader.cpp - GNU classpath java/lang/VMClassLoader -===//
-//
-// JnJVM
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <string.h>
-
-#include "types.h"
-
-#include "JavaArray.h"
-#include "JavaClass.h"
-#include "JavaObject.h"
-#include "JavaString.h"
-#include "JavaTypes.h"
-#include "JavaThread.h"
-#include "Jnjvm.h"
-#include "LockedMap.h"
-#include "NativeUtil.h"
-
-using namespace jnjvm;
-
-extern "C" {
-
-JNIEXPORT jobject JNICALL Java_java_lang_VMClassLoader_getPrimitiveClass(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jchar byteId) {
-
- AssessorDesc* ass = AssessorDesc::byteIdToPrimitive(byteId);
- Jnjvm* vm = JavaThread::get()->isolate;
- if (!ass)
- vm->unknownError("unknown byte primitive %c", byteId);
-
- return (jobject)ass->classType->getClassDelegatee();
-
-}
-
-JNIEXPORT jclass JNICALL Java_java_lang_VMClassLoader_findLoadedClass(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
- jobject loader,
- jobject _name) {
-
- Jnjvm* vm = JavaThread::get()->isolate;
- JavaString* name = (JavaString*)_name;
- const UTF8* utf8 = name->strToUTF8(vm);
- CommonClass* cl = vm->lookupClass(utf8, (JavaObject*)loader);
-
- if (cl) return (jclass)(cl->getClassDelegatee());
- else return 0;
-}
-
-JNIEXPORT jclass JNICALL Java_java_lang_VMClassLoader_loadClass(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
- jobject _str,
- jboolean doResolve) {
- JavaString* str = (JavaString*)_str;
- Jnjvm* vm = JavaThread::get()->isolate;
-
- CommonClass* cl = vm->lookupClassFromJavaString(str, 0, doResolve, false, false);
-
- if (cl != 0) {
- return (jclass)cl->getClassDelegatee();
- } else {
- return 0;
- }
-}
-
-JNIEXPORT jclass JNICALL Java_java_lang_VMClassLoader_defineClass(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
- jobject loader,
- jobject _str,
- jobject bytes,
- jint off,
- jint len,
- jobject pd) {
- Jnjvm* vm = JavaThread::get()->isolate;
- JavaString* str = (JavaString*)_str;
- const UTF8* name = str->value->javaToInternal(vm, str->offset, str->count);
- Class* cl = vm->constructClass(name, (JavaObject*)loader);
-
- if (cl->status == hashed) {
- cl->aquire();
- if (cl->status == hashed) {
- cl->bytes = (ArrayUInt8*)bytes;
- cl->status = loaded;
-#ifndef MULTIPLE_VM
- cl->delegatee = (JavaObject*)pd;
-#else
- vm->delegatees->hash(cl, (JavaObject*)pd);
-#endif
- }
- cl->release();
- }
- return (jclass)(cl->getClassDelegatee());
-}
-
-JNIEXPORT void JNICALL Java_java_lang_VMClassLoader_resolveClass(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
- jclass Cl) {
- verifyNull(Cl);
- NativeUtil::resolvedImplClass(Cl, false);
-}
-
-}
Added: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClassLoader.cpp.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClassLoader.cpp.inc?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClassLoader.cpp.inc (added)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClassLoader.cpp.inc Wed Jun 25 04:59:39 2008
@@ -0,0 +1,122 @@
+//===- ClasspathVMClassLoader.cpp - GNU classpath java/lang/VMClassLoader -===//
+//
+// JnJVM
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <string.h>
+
+#include "types.h"
+
+#include "JavaArray.h"
+#include "JavaClass.h"
+#include "JavaObject.h"
+#include "JavaString.h"
+#include "JavaTypes.h"
+#include "JavaThread.h"
+#include "Jnjvm.h"
+#include "LockedMap.h"
+#include "NativeUtil.h"
+
+using namespace jnjvm;
+
+extern "C" {
+
+JNIEXPORT jobject JNICALL Java_java_lang_VMClassLoader_getPrimitiveClass(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jchar byteId) {
+
+ AssessorDesc* ass = AssessorDesc::byteIdToPrimitive(byteId);
+ Jnjvm* vm = JavaThread::get()->isolate;
+ if (!ass)
+ vm->unknownError("unknown byte primitive %c", byteId);
+
+ return (jobject)ass->classType->getClassDelegatee();
+
+}
+
+JNIEXPORT jclass JNICALL Java_java_lang_VMClassLoader_findLoadedClass(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+ jobject loader,
+ jobject _name) {
+
+ Jnjvm* vm = JavaThread::get()->isolate;
+ JavaString* name = (JavaString*)_name;
+ const UTF8* utf8 = name->strToUTF8(vm);
+ CommonClass* cl = vm->lookupClass(utf8, (JavaObject*)loader);
+
+ if (cl) return (jclass)(cl->getClassDelegatee());
+ else return 0;
+}
+
+JNIEXPORT jclass JNICALL Java_java_lang_VMClassLoader_loadClass(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+ jobject _str,
+ jboolean doResolve) {
+ JavaString* str = (JavaString*)_str;
+ Jnjvm* vm = JavaThread::get()->isolate;
+
+ CommonClass* cl = vm->lookupClassFromJavaString(str, 0, doResolve, false, false);
+
+ if (cl != 0) {
+ return (jclass)cl->getClassDelegatee();
+ } else {
+ return 0;
+ }
+}
+
+JNIEXPORT jclass JNICALL Java_java_lang_VMClassLoader_defineClass(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+ jobject loader,
+ jobject _str,
+ jobject bytes,
+ jint off,
+ jint len,
+ jobject pd) {
+ Jnjvm* vm = JavaThread::get()->isolate;
+ JavaString* str = (JavaString*)_str;
+ const UTF8* name = str->value->javaToInternal(vm, str->offset, str->count);
+ Class* cl = vm->constructClass(name, (JavaObject*)loader);
+
+ if (cl->status == hashed) {
+ cl->aquire();
+ if (cl->status == hashed) {
+ cl->bytes = (ArrayUInt8*)bytes;
+ cl->status = loaded;
+#ifndef MULTIPLE_VM
+ cl->delegatee = (JavaObject*)pd;
+#else
+ vm->delegatees->hash(cl, (JavaObject*)pd);
+#endif
+ }
+ cl->release();
+ }
+ return (jclass)(cl->getClassDelegatee());
+}
+
+JNIEXPORT void JNICALL Java_java_lang_VMClassLoader_resolveClass(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+ jclass Cl) {
+ verifyNull(Cl);
+ NativeUtil::resolvedImplClass(Cl, false);
+}
+
+}
Removed: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp (removed)
@@ -1,707 +0,0 @@
-//===- ClasspathVMField.cpp - GNU classpath java/lang/reflect/Field -------===//
-//
-// JnJVM
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-
-#include "JavaClass.h"
-#include "JavaThread.h"
-#include "JavaTypes.h"
-#include "JavaUpcalls.h"
-#include "Jnjvm.h"
-#include "NativeUtil.h"
-
-using namespace jnjvm;
-
-extern "C" {
-
-JNIEXPORT jint JNICALL Java_java_lang_reflect_Field_getModifiersInternal(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject obj) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)obj);
- return field->access;
-}
-
-JNIEXPORT jclass JNICALL Java_java_lang_reflect_Field_getType(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject obj) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)obj);
- JavaObject* loader = field->classDef->classLoader;
- CommonClass* cl = field->getSignature()->assocClass(loader);
- return (jclass)cl->getClassDelegatee();
-}
-
-JNIEXPORT jint JNICALL Java_java_lang_reflect_Field_getInt(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject obj) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- const AssessorDesc* ass = field->getSignature()->funcs;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case INT_ID :
- return isStatic(field->access) ?
- (sint32)field->getStaticInt32Field() :
- (sint32)field->getVirtualInt32Field((JavaObject*)obj);
- case CHAR_ID :
- return isStatic(field->access) ?
- (uint32)field->getStaticInt16Field() :
- (uint32)field->getVirtualInt16Field((JavaObject*)obj);
- case BYTE_ID :
- return isStatic(field->access) ?
- (sint32)field->getStaticInt8Field() :
- (sint32)field->getVirtualInt8Field((JavaObject*)obj);
- case SHORT_ID :
- return isStatic(field->access) ?
- (sint32)field->getStaticInt16Field() :
- (sint32)field->getVirtualInt16Field((JavaObject*)obj);
- default :
- JavaThread::get()->isolate->illegalArgumentException("");
- }
- return 0;
-
-}
-
-JNIEXPORT jlong JNICALL Java_java_lang_reflect_Field_getLong(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject obj) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- const AssessorDesc* ass = field->getSignature()->funcs;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case INT_ID :
- return isStatic(field->access) ?
- (sint64)field->getStaticInt32Field() :
- (sint64)field->getVirtualInt32Field((JavaObject*)obj);
- case CHAR_ID :
- return isStatic(field->access) ?
- (uint64)field->getStaticInt16Field() :
- (uint64)field->getVirtualInt16Field((JavaObject*)obj);
- case BYTE_ID :
- return isStatic(field->access) ?
- (sint64)field->getStaticInt8Field() :
- (sint64)field->getVirtualInt8Field((JavaObject*)obj);
- case SHORT_ID :
- return isStatic(field->access) ?
- (sint64)field->getStaticInt16Field() :
- (sint64)field->getVirtualInt16Field((JavaObject*)obj);
- case LONG_ID :
- return isStatic(field->access) ?
- (sint64)field->getStaticLongField() :
- (sint64)field->getVirtualLongField((JavaObject*)obj);
- default:
- JavaThread::get()->isolate->illegalArgumentException("");
- }
- return 0;
-}
-
-JNIEXPORT jboolean JNICALL Java_java_lang_reflect_Field_getBoolean(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject obj) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- const AssessorDesc* ass = field->getSignature()->funcs;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case BOOL_ID :
- return isStatic(field->access) ?
- (uint8)field->getStaticInt8Field() :
- (uint8)field->getVirtualInt8Field((JavaObject*)obj);
- default:
- JavaThread::get()->isolate->illegalArgumentException("");
- }
-
- return 0;
-
-}
-
-JNIEXPORT jfloat JNICALL Java_java_lang_reflect_Field_getFloat(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject obj) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- const AssessorDesc* ass = field->getSignature()->funcs;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case BYTE_ID :
- return isStatic(field->access) ?
- (jfloat)field->getStaticInt8Field() :
- (jfloat)field->getVirtualInt8Field((JavaObject*)obj);
- case INT_ID :
- return isStatic(field->access) ?
- (jfloat)field->getStaticInt32Field() :
- (jfloat)field->getVirtualInt32Field((JavaObject*)obj);
- case SHORT_ID :
- return isStatic(field->access) ?
- (jfloat)field->getStaticInt16Field() :
- (jfloat)field->getVirtualInt16Field((JavaObject*)obj);
- case LONG_ID :
- return isStatic(field->access) ?
- (jfloat)field->getStaticLongField() :
- (jfloat)field->getVirtualLongField((JavaObject*)obj);
- case CHAR_ID :
- return isStatic(field->access) ?
- (jfloat)(uint32)field->getStaticInt16Field() :
- (jfloat)(uint32)field->getVirtualInt16Field((JavaObject*)obj);
- case FLOAT_ID :
- return isStatic(field->access) ?
- (jfloat)field->getStaticFloatField() :
- (jfloat)field->getVirtualFloatField((JavaObject*)obj);
- default:
- JavaThread::get()->isolate->illegalArgumentException("");
- }
- return 0.0;
-}
-
-JNIEXPORT jbyte JNICALL Java_java_lang_reflect_Field_getByte(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject obj) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- const AssessorDesc* ass = field->getSignature()->funcs;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case BYTE_ID :
- return isStatic(field->access) ?
- (sint8)field->getStaticInt8Field() :
- (sint8)field->getVirtualInt8Field((JavaObject*)obj);
- default :
- JavaThread::get()->isolate->illegalArgumentException("");
- }
-
- return 0;
-}
-
-JNIEXPORT jchar JNICALL Java_java_lang_reflect_Field_getChar(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject obj) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- const AssessorDesc* ass = field->getSignature()->funcs;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case CHAR_ID :
- return isStatic(field->access) ?
- (uint16)field->getStaticInt16Field() :
- (uint16)field->getVirtualInt16Field((JavaObject*)obj);
- default :
- JavaThread::get()->isolate->illegalArgumentException("");
- }
-
- return 0;
-
-}
-
-JNIEXPORT jshort JNICALL Java_java_lang_reflect_Field_getShort(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject obj) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- const AssessorDesc* ass = field->getSignature()->funcs;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case SHORT_ID :
- return isStatic(field->access) ?
- (sint16)field->getStaticInt16Field() :
- (sint16)field->getVirtualInt16Field((JavaObject*)obj);
- case BYTE_ID :
- return isStatic(field->access) ?
- (sint16)field->getStaticInt8Field() :
- (sint16)field->getVirtualInt8Field((JavaObject*)obj);
- default :
- JavaThread::get()->isolate->illegalArgumentException("");
- }
-
- return 0;
-}
-
-JNIEXPORT jdouble JNICALL Java_java_lang_reflect_Field_getDouble(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject obj) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- const AssessorDesc* ass = field->getSignature()->funcs;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case BYTE_ID :
- return isStatic(field->access) ?
- (jdouble)(sint64)field->getStaticInt8Field() :
- (jdouble)(sint64)field->getVirtualInt8Field((JavaObject*)obj);
- case INT_ID :
- return isStatic(field->access) ?
- (jdouble)(sint64)field->getStaticInt32Field() :
- (jdouble)(sint64)field->getVirtualInt32Field((JavaObject*)obj);
- case SHORT_ID :
- return isStatic(field->access) ?
- (jdouble)(sint64)field->getStaticInt16Field() :
- (jdouble)(sint64)field->getVirtualInt16Field((JavaObject*)obj);
- case LONG_ID :
- return isStatic(field->access) ?
- (jdouble)(sint64)field->getStaticLongField() :
- (jdouble)(sint64)field->getVirtualLongField((JavaObject*)obj);
- case CHAR_ID :
- return isStatic(field->access) ?
- (jdouble)(uint64)field->getStaticInt16Field() :
- (jdouble)(uint64)field->getVirtualInt16Field((JavaObject*)obj);
- case FLOAT_ID :
- return isStatic(field->access) ?
- (jdouble)field->getStaticFloatField() :
- (jdouble)field->getVirtualFloatField((JavaObject*)obj);
- case DOUBLE_ID :
- return isStatic(field->access) ?
- (jdouble)field->getStaticDoubleField() :
- (jdouble)field->getVirtualDoubleField((JavaObject*)obj);
- default :
- JavaThread::get()->isolate->illegalArgumentException("");
- }
- return 0.0;
-}
-
-JNIEXPORT jobject JNICALL Java_java_lang_reflect_Field_get(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject _obj) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- Typedef* type = field->getSignature();
- const AssessorDesc* ass = type->funcs;
- JavaObject* obj = (JavaObject*)_obj;
- Jnjvm* vm = JavaThread::get()->isolate;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- JavaObject* res = 0;
- switch (ass->numId) {
- case BOOL_ID : {
- uint8 val = (isStatic(field->access) ?
- field->getStaticInt8Field() :
- field->getVirtualInt8Field(obj));
- res = (*Classpath::boolClass)(vm);
- Classpath::boolValue->setVirtualInt8Field(res, val);
- break;
- }
- case BYTE_ID : {
- sint8 val = (isStatic(field->access) ?
- field->getStaticInt8Field() :
- field->getVirtualInt8Field(obj));
- res = (*Classpath::byteClass)(vm);
- Classpath::byteValue->setVirtualInt8Field(res, val);
- break;
- }
- case CHAR_ID : {
- uint16 val = (isStatic(field->access) ?
- field->getStaticInt16Field() :
- field->getVirtualInt16Field(obj));
- res = (*Classpath::charClass)(vm);
- Classpath::charValue->setVirtualInt16Field(res, val);
- break;
- }
- case SHORT_ID : {
- sint16 val = (isStatic(field->access) ?
- field->getStaticInt16Field() :
- field->getVirtualInt16Field(obj));
- res = (*Classpath::shortClass)(vm);
- Classpath::shortValue->setVirtualInt16Field(res, val);
- break;
- }
- case INT_ID : {
- sint32 val = (isStatic(field->access) ?
- field->getStaticInt32Field() :
- field->getVirtualInt32Field(obj));
- res = (*Classpath::intClass)(vm);
- Classpath::intValue->setVirtualInt32Field(res, val);
- break;
- }
- case LONG_ID : {
- sint64 val = (isStatic(field->access) ?
- field->getStaticLongField() :
- field->getVirtualLongField(obj));
- res = (*Classpath::longClass)(vm);
- Classpath::longValue->setVirtualLongField(res, val);
- break;
- }
- case FLOAT_ID : {
- float val = (isStatic(field->access) ?
- field->getStaticFloatField() :
- field->getVirtualFloatField(obj));
- res = (*Classpath::floatClass)(vm);
- Classpath::floatValue->setVirtualFloatField(res, val);
- break;
- }
- case DOUBLE_ID : {
- double val = (isStatic(field->access) ?
- field->getStaticDoubleField() :
- field->getVirtualDoubleField(obj));
- res = (*Classpath::doubleClass)(vm);
- Classpath::doubleValue->setVirtualDoubleField(res, val);
- break;
- }
- case OBJECT_ID :
- case ARRAY_ID :
- res = (isStatic(field->access) ?
- field->getStaticObjectField() :
- field->getVirtualObjectField(obj));
- break;
- default:
- JavaThread::get()->isolate->unknownError("should not be here");
- }
- return (jobject)res;
-}
-
-JNIEXPORT void JNICALL Java_java_lang_reflect_Field_set(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject obj, jobject val) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- void** buf = (void**)alloca(sizeof(uint64));
- void* _buf = (void*)buf;
- NativeUtil::decapsulePrimitive(JavaThread::get()->isolate, buf, (JavaObject*)val, field->getSignature());
-
- const AssessorDesc* ass = field->getSignature()->funcs;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case BOOL_ID :
- return isStatic(field->access) ?
- field->setStaticInt8Field(((uint8*)_buf)[0]) :
- field->setVirtualInt8Field((JavaObject*)obj, ((uint8*)_buf)[0]);
- case BYTE_ID :
- return isStatic(field->access) ?
- field->setStaticInt8Field(((sint8*)_buf)[0]) :
- field->setVirtualInt8Field((JavaObject*)obj, ((sint8*)_buf)[0]);
- case CHAR_ID :
- return isStatic(field->access) ?
- field->setStaticInt16Field(((uint16*)_buf)[0]) :
- field->setVirtualInt16Field((JavaObject*)obj, ((uint16*)_buf)[0]);
- case SHORT_ID :
- return isStatic(field->access) ?
- field->setStaticInt16Field(((sint16*)_buf)[0]) :
- field->setVirtualInt16Field((JavaObject*)obj, ((sint16*)_buf)[0]);
- case INT_ID :
- return isStatic(field->access) ?
- field->setStaticInt32Field(((sint32*)_buf)[0]) :
- field->setVirtualInt32Field((JavaObject*)obj, ((sint32*)_buf)[0]);
- case LONG_ID :
- return isStatic(field->access) ?
- field->setStaticLongField(((sint64*)_buf)[0]) :
- field->setVirtualLongField((JavaObject*)obj, ((sint64*)_buf)[0]);
- case FLOAT_ID :
- return isStatic(field->access) ?
- field->setStaticFloatField(((float*)_buf)[0]) :
- field->setVirtualFloatField((JavaObject*)obj, ((float*)_buf)[0]);
- case DOUBLE_ID :
- return isStatic(field->access) ?
- field->setStaticDoubleField(((double*)_buf)[0]) :
- field->setVirtualDoubleField((JavaObject*)obj, ((double*)_buf)[0]);
- case ARRAY_ID :
- case OBJECT_ID :
- return isStatic(field->access) ?
- field->setStaticObjectField(((JavaObject**)_buf)[0]) :
- field->setVirtualObjectField((JavaObject*)obj, ((JavaObject**)_buf)[0]);
- default :
- JavaThread::get()->isolate->unknownError("should not be here");
- }
-}
-
-JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setBoolean(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject obj, jboolean val) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- const AssessorDesc* ass = field->getSignature()->funcs;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case BOOL_ID :
- return isStatic(field->access) ?
- field->setStaticInt8Field((uint8)val) :
- field->setVirtualInt8Field((JavaObject*)obj, (uint8)val);
- default :
- JavaThread::get()->isolate->illegalArgumentException("");
- }
-
-}
-
-JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setByte(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject _obj, jbyte val) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- const AssessorDesc* ass = field->getSignature()->funcs;
- JavaObject* obj = (JavaObject*)_obj;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case BYTE_ID :
- return isStatic(field->access) ?
- field->setStaticInt8Field((sint8)val) :
- field->setVirtualInt8Field((JavaObject*)obj, (sint8)val);
- case SHORT_ID :
- return isStatic(field->access) ?
- field->setStaticInt16Field((sint16)val) :
- field->setVirtualInt16Field((JavaObject*)obj, (sint16)val);
- case INT_ID :
- return isStatic(field->access) ?
- field->setStaticInt32Field((sint32)val) :
- field->setVirtualInt32Field((JavaObject*)obj, (sint32)val);
- case LONG_ID :
- return isStatic(field->access) ?
- field->setStaticLongField((sint64)val) :
- field->setVirtualLongField((JavaObject*)obj, (sint64)val);
- case FLOAT_ID :
- return isStatic(field->access) ?
- field->setStaticFloatField((float)val) :
- field->setVirtualFloatField((JavaObject*)obj, (float)val);
- case DOUBLE_ID :
- return isStatic(field->access) ?
- field->setStaticDoubleField((double)val) :
- field->setVirtualDoubleField((JavaObject*)obj, (double)val);
- default :
- JavaThread::get()->isolate->illegalArgumentException("");
- }
-}
-
-JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setChar(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject obj, jchar val) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- const AssessorDesc* ass = field->getSignature()->funcs;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case CHAR_ID :
- return isStatic(field->access) ?
- field->setStaticInt16Field((uint16)val) :
- field->setVirtualDoubleField((JavaObject*)obj, (uint16)val);
- case INT_ID :
- return isStatic(field->access) ?
- field->setStaticInt32Field((uint32)val) :
- field->setVirtualInt32Field((JavaObject*)obj, (uint32)val);
- case LONG_ID :
- return isStatic(field->access) ?
- field->setStaticLongField((uint64)val) :
- field->setVirtualLongField((JavaObject*)obj, (uint64)val);
- case FLOAT_ID :
- return isStatic(field->access) ?
- field->setStaticFloatField((float)(uint32)val) :
- field->setVirtualFloatField((JavaObject*)obj, (float)(uint32)val);
- case DOUBLE_ID :
- return isStatic(field->access) ?
- field->setStaticDoubleField((double)(uint64)val) :
- field->setVirtualDoubleField((JavaObject*)obj, (double)(uint64)val);
- default :
- JavaThread::get()->isolate->illegalArgumentException("");
- }
-}
-
-JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setShort(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject obj, jshort val) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- const AssessorDesc* ass = field->getSignature()->funcs;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case SHORT_ID :
- return isStatic(field->access) ?
- field->setStaticInt16Field((sint16)val) :
- field->setVirtualInt16Field((JavaObject*)obj, (sint16)val);
- case INT_ID :
- return isStatic(field->access) ?
- field->setStaticInt32Field((sint32)val) :
- field->setVirtualInt32Field((JavaObject*)obj, (sint32)val);
- case LONG_ID :
- return isStatic(field->access) ?
- field->setStaticLongField((sint64)val) :
- field->setVirtualLongField((JavaObject*)obj, (sint64)val);
- case FLOAT_ID :
- return isStatic(field->access) ?
- field->setStaticFloatField((float)val) :
- field->setVirtualFloatField((JavaObject*)obj, (float)val);
- case DOUBLE_ID :
- return isStatic(field->access) ?
- field->setStaticDoubleField((double)val) :
- field->setVirtualDoubleField((JavaObject*)obj, (double)val);
- default :
- JavaThread::get()->isolate->illegalArgumentException("");
- }
-}
-
-JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setInt(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject obj, jint val) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- const AssessorDesc* ass = field->getSignature()->funcs;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case INT_ID :
- return isStatic(field->access) ?
- field->setStaticInt32Field((sint32)val) :
- field->setVirtualInt32Field((JavaObject*)obj, (sint32)val);
- case LONG_ID :
- return isStatic(field->access) ?
- field->setStaticLongField((sint64)val) :
- field->setVirtualLongField((JavaObject*)obj, (sint64)val);
- case FLOAT_ID :
- return isStatic(field->access) ?
- field->setStaticFloatField((float)val) :
- field->setVirtualFloatField((JavaObject*)obj, (float)val);
- case DOUBLE_ID :
- return isStatic(field->access) ?
- field->setStaticDoubleField((double)val) :
- field->setVirtualDoubleField((JavaObject*)obj, (double)val);
- default :
- JavaThread::get()->isolate->illegalArgumentException("");
- }
-}
-
-JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setLong(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject obj, jlong val) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- const AssessorDesc* ass = field->getSignature()->funcs;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case LONG_ID :
- return isStatic(field->access) ?
- field->setStaticLongField((sint64)val) :
- field->setVirtualLongField((JavaObject*)obj, (sint64)val);
- case FLOAT_ID :
- return isStatic(field->access) ?
- field->setStaticFloatField((float)val) :
- field->setVirtualFloatField((JavaObject*)obj, (float)val);
- case DOUBLE_ID :
- return isStatic(field->access) ?
- field->setStaticDoubleField((double)val) :
- field->setVirtualDoubleField((JavaObject*)obj, (double)val);
- default :
- JavaThread::get()->isolate->illegalArgumentException("");
- }
-}
-
-JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setFloat(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject obj, jfloat val) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- const AssessorDesc* ass = field->getSignature()->funcs;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case FLOAT_ID :
- return isStatic(field->access) ?
- field->setStaticFloatField((float)val) :
- field->setVirtualFloatField((JavaObject*)obj, (float)val);
- case DOUBLE_ID :
- return isStatic(field->access) ?
- field->setStaticDoubleField((double)val) :
- field->setVirtualDoubleField((JavaObject*)obj, (double)val);
- default :
- JavaThread::get()->isolate->illegalArgumentException("");
- }
-}
-
-JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setDouble(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject Field, jobject obj, jdouble val) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- const AssessorDesc* ass = field->getSignature()->funcs;
-
- if (isStatic(field->access))
- JavaThread::get()->isolate->initialiseClass(field->classDef);
-
- switch (ass->numId) {
- case DOUBLE_ID :
- return isStatic(field->access) ?
- field->setStaticDoubleField((double)val) :
- field->setVirtualDoubleField((JavaObject*)obj, (double)val);
- default :
- JavaThread::get()->isolate->illegalArgumentException("");
- }
-}
-
-JNIEXPORT jlong JNICALL Java_sun_misc_Unsafe_objectFieldOffset(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-JavaObject* Unsafe,
-JavaObject* Field) {
- JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
- return (jlong)field->ptrOffset;
-}
-
-}
Added: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp.inc?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp.inc (added)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp.inc Wed Jun 25 04:59:39 2008
@@ -0,0 +1,707 @@
+//===- ClasspathVMField.cpp - GNU classpath java/lang/reflect/Field -------===//
+//
+// JnJVM
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+
+#include "JavaClass.h"
+#include "JavaThread.h"
+#include "JavaTypes.h"
+#include "JavaUpcalls.h"
+#include "Jnjvm.h"
+#include "NativeUtil.h"
+
+using namespace jnjvm;
+
+extern "C" {
+
+JNIEXPORT jint JNICALL Java_java_lang_reflect_Field_getModifiersInternal(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject obj) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)obj);
+ return field->access;
+}
+
+JNIEXPORT jclass JNICALL Java_java_lang_reflect_Field_getType(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject obj) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)obj);
+ JavaObject* loader = field->classDef->classLoader;
+ CommonClass* cl = field->getSignature()->assocClass(loader);
+ return (jclass)cl->getClassDelegatee();
+}
+
+JNIEXPORT jint JNICALL Java_java_lang_reflect_Field_getInt(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject obj) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ const AssessorDesc* ass = field->getSignature()->funcs;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case INT_ID :
+ return isStatic(field->access) ?
+ (sint32)field->getStaticInt32Field() :
+ (sint32)field->getVirtualInt32Field((JavaObject*)obj);
+ case CHAR_ID :
+ return isStatic(field->access) ?
+ (uint32)field->getStaticInt16Field() :
+ (uint32)field->getVirtualInt16Field((JavaObject*)obj);
+ case BYTE_ID :
+ return isStatic(field->access) ?
+ (sint32)field->getStaticInt8Field() :
+ (sint32)field->getVirtualInt8Field((JavaObject*)obj);
+ case SHORT_ID :
+ return isStatic(field->access) ?
+ (sint32)field->getStaticInt16Field() :
+ (sint32)field->getVirtualInt16Field((JavaObject*)obj);
+ default :
+ JavaThread::get()->isolate->illegalArgumentException("");
+ }
+ return 0;
+
+}
+
+JNIEXPORT jlong JNICALL Java_java_lang_reflect_Field_getLong(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject obj) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ const AssessorDesc* ass = field->getSignature()->funcs;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case INT_ID :
+ return isStatic(field->access) ?
+ (sint64)field->getStaticInt32Field() :
+ (sint64)field->getVirtualInt32Field((JavaObject*)obj);
+ case CHAR_ID :
+ return isStatic(field->access) ?
+ (uint64)field->getStaticInt16Field() :
+ (uint64)field->getVirtualInt16Field((JavaObject*)obj);
+ case BYTE_ID :
+ return isStatic(field->access) ?
+ (sint64)field->getStaticInt8Field() :
+ (sint64)field->getVirtualInt8Field((JavaObject*)obj);
+ case SHORT_ID :
+ return isStatic(field->access) ?
+ (sint64)field->getStaticInt16Field() :
+ (sint64)field->getVirtualInt16Field((JavaObject*)obj);
+ case LONG_ID :
+ return isStatic(field->access) ?
+ (sint64)field->getStaticLongField() :
+ (sint64)field->getVirtualLongField((JavaObject*)obj);
+ default:
+ JavaThread::get()->isolate->illegalArgumentException("");
+ }
+ return 0;
+}
+
+JNIEXPORT jboolean JNICALL Java_java_lang_reflect_Field_getBoolean(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject obj) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ const AssessorDesc* ass = field->getSignature()->funcs;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case BOOL_ID :
+ return isStatic(field->access) ?
+ (uint8)field->getStaticInt8Field() :
+ (uint8)field->getVirtualInt8Field((JavaObject*)obj);
+ default:
+ JavaThread::get()->isolate->illegalArgumentException("");
+ }
+
+ return 0;
+
+}
+
+JNIEXPORT jfloat JNICALL Java_java_lang_reflect_Field_getFloat(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject obj) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ const AssessorDesc* ass = field->getSignature()->funcs;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case BYTE_ID :
+ return isStatic(field->access) ?
+ (jfloat)field->getStaticInt8Field() :
+ (jfloat)field->getVirtualInt8Field((JavaObject*)obj);
+ case INT_ID :
+ return isStatic(field->access) ?
+ (jfloat)field->getStaticInt32Field() :
+ (jfloat)field->getVirtualInt32Field((JavaObject*)obj);
+ case SHORT_ID :
+ return isStatic(field->access) ?
+ (jfloat)field->getStaticInt16Field() :
+ (jfloat)field->getVirtualInt16Field((JavaObject*)obj);
+ case LONG_ID :
+ return isStatic(field->access) ?
+ (jfloat)field->getStaticLongField() :
+ (jfloat)field->getVirtualLongField((JavaObject*)obj);
+ case CHAR_ID :
+ return isStatic(field->access) ?
+ (jfloat)(uint32)field->getStaticInt16Field() :
+ (jfloat)(uint32)field->getVirtualInt16Field((JavaObject*)obj);
+ case FLOAT_ID :
+ return isStatic(field->access) ?
+ (jfloat)field->getStaticFloatField() :
+ (jfloat)field->getVirtualFloatField((JavaObject*)obj);
+ default:
+ JavaThread::get()->isolate->illegalArgumentException("");
+ }
+ return 0.0;
+}
+
+JNIEXPORT jbyte JNICALL Java_java_lang_reflect_Field_getByte(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject obj) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ const AssessorDesc* ass = field->getSignature()->funcs;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case BYTE_ID :
+ return isStatic(field->access) ?
+ (sint8)field->getStaticInt8Field() :
+ (sint8)field->getVirtualInt8Field((JavaObject*)obj);
+ default :
+ JavaThread::get()->isolate->illegalArgumentException("");
+ }
+
+ return 0;
+}
+
+JNIEXPORT jchar JNICALL Java_java_lang_reflect_Field_getChar(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject obj) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ const AssessorDesc* ass = field->getSignature()->funcs;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case CHAR_ID :
+ return isStatic(field->access) ?
+ (uint16)field->getStaticInt16Field() :
+ (uint16)field->getVirtualInt16Field((JavaObject*)obj);
+ default :
+ JavaThread::get()->isolate->illegalArgumentException("");
+ }
+
+ return 0;
+
+}
+
+JNIEXPORT jshort JNICALL Java_java_lang_reflect_Field_getShort(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject obj) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ const AssessorDesc* ass = field->getSignature()->funcs;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case SHORT_ID :
+ return isStatic(field->access) ?
+ (sint16)field->getStaticInt16Field() :
+ (sint16)field->getVirtualInt16Field((JavaObject*)obj);
+ case BYTE_ID :
+ return isStatic(field->access) ?
+ (sint16)field->getStaticInt8Field() :
+ (sint16)field->getVirtualInt8Field((JavaObject*)obj);
+ default :
+ JavaThread::get()->isolate->illegalArgumentException("");
+ }
+
+ return 0;
+}
+
+JNIEXPORT jdouble JNICALL Java_java_lang_reflect_Field_getDouble(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject obj) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ const AssessorDesc* ass = field->getSignature()->funcs;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case BYTE_ID :
+ return isStatic(field->access) ?
+ (jdouble)(sint64)field->getStaticInt8Field() :
+ (jdouble)(sint64)field->getVirtualInt8Field((JavaObject*)obj);
+ case INT_ID :
+ return isStatic(field->access) ?
+ (jdouble)(sint64)field->getStaticInt32Field() :
+ (jdouble)(sint64)field->getVirtualInt32Field((JavaObject*)obj);
+ case SHORT_ID :
+ return isStatic(field->access) ?
+ (jdouble)(sint64)field->getStaticInt16Field() :
+ (jdouble)(sint64)field->getVirtualInt16Field((JavaObject*)obj);
+ case LONG_ID :
+ return isStatic(field->access) ?
+ (jdouble)(sint64)field->getStaticLongField() :
+ (jdouble)(sint64)field->getVirtualLongField((JavaObject*)obj);
+ case CHAR_ID :
+ return isStatic(field->access) ?
+ (jdouble)(uint64)field->getStaticInt16Field() :
+ (jdouble)(uint64)field->getVirtualInt16Field((JavaObject*)obj);
+ case FLOAT_ID :
+ return isStatic(field->access) ?
+ (jdouble)field->getStaticFloatField() :
+ (jdouble)field->getVirtualFloatField((JavaObject*)obj);
+ case DOUBLE_ID :
+ return isStatic(field->access) ?
+ (jdouble)field->getStaticDoubleField() :
+ (jdouble)field->getVirtualDoubleField((JavaObject*)obj);
+ default :
+ JavaThread::get()->isolate->illegalArgumentException("");
+ }
+ return 0.0;
+}
+
+JNIEXPORT jobject JNICALL Java_java_lang_reflect_Field_get(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject _obj) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ Typedef* type = field->getSignature();
+ const AssessorDesc* ass = type->funcs;
+ JavaObject* obj = (JavaObject*)_obj;
+ Jnjvm* vm = JavaThread::get()->isolate;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ JavaObject* res = 0;
+ switch (ass->numId) {
+ case BOOL_ID : {
+ uint8 val = (isStatic(field->access) ?
+ field->getStaticInt8Field() :
+ field->getVirtualInt8Field(obj));
+ res = (*Classpath::boolClass)(vm);
+ Classpath::boolValue->setVirtualInt8Field(res, val);
+ break;
+ }
+ case BYTE_ID : {
+ sint8 val = (isStatic(field->access) ?
+ field->getStaticInt8Field() :
+ field->getVirtualInt8Field(obj));
+ res = (*Classpath::byteClass)(vm);
+ Classpath::byteValue->setVirtualInt8Field(res, val);
+ break;
+ }
+ case CHAR_ID : {
+ uint16 val = (isStatic(field->access) ?
+ field->getStaticInt16Field() :
+ field->getVirtualInt16Field(obj));
+ res = (*Classpath::charClass)(vm);
+ Classpath::charValue->setVirtualInt16Field(res, val);
+ break;
+ }
+ case SHORT_ID : {
+ sint16 val = (isStatic(field->access) ?
+ field->getStaticInt16Field() :
+ field->getVirtualInt16Field(obj));
+ res = (*Classpath::shortClass)(vm);
+ Classpath::shortValue->setVirtualInt16Field(res, val);
+ break;
+ }
+ case INT_ID : {
+ sint32 val = (isStatic(field->access) ?
+ field->getStaticInt32Field() :
+ field->getVirtualInt32Field(obj));
+ res = (*Classpath::intClass)(vm);
+ Classpath::intValue->setVirtualInt32Field(res, val);
+ break;
+ }
+ case LONG_ID : {
+ sint64 val = (isStatic(field->access) ?
+ field->getStaticLongField() :
+ field->getVirtualLongField(obj));
+ res = (*Classpath::longClass)(vm);
+ Classpath::longValue->setVirtualLongField(res, val);
+ break;
+ }
+ case FLOAT_ID : {
+ float val = (isStatic(field->access) ?
+ field->getStaticFloatField() :
+ field->getVirtualFloatField(obj));
+ res = (*Classpath::floatClass)(vm);
+ Classpath::floatValue->setVirtualFloatField(res, val);
+ break;
+ }
+ case DOUBLE_ID : {
+ double val = (isStatic(field->access) ?
+ field->getStaticDoubleField() :
+ field->getVirtualDoubleField(obj));
+ res = (*Classpath::doubleClass)(vm);
+ Classpath::doubleValue->setVirtualDoubleField(res, val);
+ break;
+ }
+ case OBJECT_ID :
+ case ARRAY_ID :
+ res = (isStatic(field->access) ?
+ field->getStaticObjectField() :
+ field->getVirtualObjectField(obj));
+ break;
+ default:
+ JavaThread::get()->isolate->unknownError("should not be here");
+ }
+ return (jobject)res;
+}
+
+JNIEXPORT void JNICALL Java_java_lang_reflect_Field_set(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject obj, jobject val) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ void** buf = (void**)alloca(sizeof(uint64));
+ void* _buf = (void*)buf;
+ NativeUtil::decapsulePrimitive(JavaThread::get()->isolate, buf, (JavaObject*)val, field->getSignature());
+
+ const AssessorDesc* ass = field->getSignature()->funcs;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case BOOL_ID :
+ return isStatic(field->access) ?
+ field->setStaticInt8Field(((uint8*)_buf)[0]) :
+ field->setVirtualInt8Field((JavaObject*)obj, ((uint8*)_buf)[0]);
+ case BYTE_ID :
+ return isStatic(field->access) ?
+ field->setStaticInt8Field(((sint8*)_buf)[0]) :
+ field->setVirtualInt8Field((JavaObject*)obj, ((sint8*)_buf)[0]);
+ case CHAR_ID :
+ return isStatic(field->access) ?
+ field->setStaticInt16Field(((uint16*)_buf)[0]) :
+ field->setVirtualInt16Field((JavaObject*)obj, ((uint16*)_buf)[0]);
+ case SHORT_ID :
+ return isStatic(field->access) ?
+ field->setStaticInt16Field(((sint16*)_buf)[0]) :
+ field->setVirtualInt16Field((JavaObject*)obj, ((sint16*)_buf)[0]);
+ case INT_ID :
+ return isStatic(field->access) ?
+ field->setStaticInt32Field(((sint32*)_buf)[0]) :
+ field->setVirtualInt32Field((JavaObject*)obj, ((sint32*)_buf)[0]);
+ case LONG_ID :
+ return isStatic(field->access) ?
+ field->setStaticLongField(((sint64*)_buf)[0]) :
+ field->setVirtualLongField((JavaObject*)obj, ((sint64*)_buf)[0]);
+ case FLOAT_ID :
+ return isStatic(field->access) ?
+ field->setStaticFloatField(((float*)_buf)[0]) :
+ field->setVirtualFloatField((JavaObject*)obj, ((float*)_buf)[0]);
+ case DOUBLE_ID :
+ return isStatic(field->access) ?
+ field->setStaticDoubleField(((double*)_buf)[0]) :
+ field->setVirtualDoubleField((JavaObject*)obj, ((double*)_buf)[0]);
+ case ARRAY_ID :
+ case OBJECT_ID :
+ return isStatic(field->access) ?
+ field->setStaticObjectField(((JavaObject**)_buf)[0]) :
+ field->setVirtualObjectField((JavaObject*)obj, ((JavaObject**)_buf)[0]);
+ default :
+ JavaThread::get()->isolate->unknownError("should not be here");
+ }
+}
+
+JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setBoolean(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject obj, jboolean val) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ const AssessorDesc* ass = field->getSignature()->funcs;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case BOOL_ID :
+ return isStatic(field->access) ?
+ field->setStaticInt8Field((uint8)val) :
+ field->setVirtualInt8Field((JavaObject*)obj, (uint8)val);
+ default :
+ JavaThread::get()->isolate->illegalArgumentException("");
+ }
+
+}
+
+JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setByte(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject _obj, jbyte val) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ const AssessorDesc* ass = field->getSignature()->funcs;
+ JavaObject* obj = (JavaObject*)_obj;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case BYTE_ID :
+ return isStatic(field->access) ?
+ field->setStaticInt8Field((sint8)val) :
+ field->setVirtualInt8Field((JavaObject*)obj, (sint8)val);
+ case SHORT_ID :
+ return isStatic(field->access) ?
+ field->setStaticInt16Field((sint16)val) :
+ field->setVirtualInt16Field((JavaObject*)obj, (sint16)val);
+ case INT_ID :
+ return isStatic(field->access) ?
+ field->setStaticInt32Field((sint32)val) :
+ field->setVirtualInt32Field((JavaObject*)obj, (sint32)val);
+ case LONG_ID :
+ return isStatic(field->access) ?
+ field->setStaticLongField((sint64)val) :
+ field->setVirtualLongField((JavaObject*)obj, (sint64)val);
+ case FLOAT_ID :
+ return isStatic(field->access) ?
+ field->setStaticFloatField((float)val) :
+ field->setVirtualFloatField((JavaObject*)obj, (float)val);
+ case DOUBLE_ID :
+ return isStatic(field->access) ?
+ field->setStaticDoubleField((double)val) :
+ field->setVirtualDoubleField((JavaObject*)obj, (double)val);
+ default :
+ JavaThread::get()->isolate->illegalArgumentException("");
+ }
+}
+
+JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setChar(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject obj, jchar val) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ const AssessorDesc* ass = field->getSignature()->funcs;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case CHAR_ID :
+ return isStatic(field->access) ?
+ field->setStaticInt16Field((uint16)val) :
+ field->setVirtualDoubleField((JavaObject*)obj, (uint16)val);
+ case INT_ID :
+ return isStatic(field->access) ?
+ field->setStaticInt32Field((uint32)val) :
+ field->setVirtualInt32Field((JavaObject*)obj, (uint32)val);
+ case LONG_ID :
+ return isStatic(field->access) ?
+ field->setStaticLongField((uint64)val) :
+ field->setVirtualLongField((JavaObject*)obj, (uint64)val);
+ case FLOAT_ID :
+ return isStatic(field->access) ?
+ field->setStaticFloatField((float)(uint32)val) :
+ field->setVirtualFloatField((JavaObject*)obj, (float)(uint32)val);
+ case DOUBLE_ID :
+ return isStatic(field->access) ?
+ field->setStaticDoubleField((double)(uint64)val) :
+ field->setVirtualDoubleField((JavaObject*)obj, (double)(uint64)val);
+ default :
+ JavaThread::get()->isolate->illegalArgumentException("");
+ }
+}
+
+JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setShort(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject obj, jshort val) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ const AssessorDesc* ass = field->getSignature()->funcs;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case SHORT_ID :
+ return isStatic(field->access) ?
+ field->setStaticInt16Field((sint16)val) :
+ field->setVirtualInt16Field((JavaObject*)obj, (sint16)val);
+ case INT_ID :
+ return isStatic(field->access) ?
+ field->setStaticInt32Field((sint32)val) :
+ field->setVirtualInt32Field((JavaObject*)obj, (sint32)val);
+ case LONG_ID :
+ return isStatic(field->access) ?
+ field->setStaticLongField((sint64)val) :
+ field->setVirtualLongField((JavaObject*)obj, (sint64)val);
+ case FLOAT_ID :
+ return isStatic(field->access) ?
+ field->setStaticFloatField((float)val) :
+ field->setVirtualFloatField((JavaObject*)obj, (float)val);
+ case DOUBLE_ID :
+ return isStatic(field->access) ?
+ field->setStaticDoubleField((double)val) :
+ field->setVirtualDoubleField((JavaObject*)obj, (double)val);
+ default :
+ JavaThread::get()->isolate->illegalArgumentException("");
+ }
+}
+
+JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setInt(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject obj, jint val) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ const AssessorDesc* ass = field->getSignature()->funcs;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case INT_ID :
+ return isStatic(field->access) ?
+ field->setStaticInt32Field((sint32)val) :
+ field->setVirtualInt32Field((JavaObject*)obj, (sint32)val);
+ case LONG_ID :
+ return isStatic(field->access) ?
+ field->setStaticLongField((sint64)val) :
+ field->setVirtualLongField((JavaObject*)obj, (sint64)val);
+ case FLOAT_ID :
+ return isStatic(field->access) ?
+ field->setStaticFloatField((float)val) :
+ field->setVirtualFloatField((JavaObject*)obj, (float)val);
+ case DOUBLE_ID :
+ return isStatic(field->access) ?
+ field->setStaticDoubleField((double)val) :
+ field->setVirtualDoubleField((JavaObject*)obj, (double)val);
+ default :
+ JavaThread::get()->isolate->illegalArgumentException("");
+ }
+}
+
+JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setLong(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject obj, jlong val) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ const AssessorDesc* ass = field->getSignature()->funcs;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case LONG_ID :
+ return isStatic(field->access) ?
+ field->setStaticLongField((sint64)val) :
+ field->setVirtualLongField((JavaObject*)obj, (sint64)val);
+ case FLOAT_ID :
+ return isStatic(field->access) ?
+ field->setStaticFloatField((float)val) :
+ field->setVirtualFloatField((JavaObject*)obj, (float)val);
+ case DOUBLE_ID :
+ return isStatic(field->access) ?
+ field->setStaticDoubleField((double)val) :
+ field->setVirtualDoubleField((JavaObject*)obj, (double)val);
+ default :
+ JavaThread::get()->isolate->illegalArgumentException("");
+ }
+}
+
+JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setFloat(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject obj, jfloat val) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ const AssessorDesc* ass = field->getSignature()->funcs;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case FLOAT_ID :
+ return isStatic(field->access) ?
+ field->setStaticFloatField((float)val) :
+ field->setVirtualFloatField((JavaObject*)obj, (float)val);
+ case DOUBLE_ID :
+ return isStatic(field->access) ?
+ field->setStaticDoubleField((double)val) :
+ field->setVirtualDoubleField((JavaObject*)obj, (double)val);
+ default :
+ JavaThread::get()->isolate->illegalArgumentException("");
+ }
+}
+
+JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setDouble(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject Field, jobject obj, jdouble val) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ const AssessorDesc* ass = field->getSignature()->funcs;
+
+ if (isStatic(field->access))
+ JavaThread::get()->isolate->initialiseClass(field->classDef);
+
+ switch (ass->numId) {
+ case DOUBLE_ID :
+ return isStatic(field->access) ?
+ field->setStaticDoubleField((double)val) :
+ field->setVirtualDoubleField((JavaObject*)obj, (double)val);
+ default :
+ JavaThread::get()->isolate->illegalArgumentException("");
+ }
+}
+
+JNIEXPORT jlong JNICALL Java_sun_misc_Unsafe_objectFieldOffset(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+JavaObject* Unsafe,
+JavaObject* Field) {
+ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field);
+ return (jlong)field->ptrOffset;
+}
+
+}
Removed: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMObject.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMObject.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMObject.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMObject.cpp (removed)
@@ -1,99 +0,0 @@
-//===------ ClasspathVMObject.cpp - GNU classpath java/lang/VMObject ------===//
-//
-// JnJVM
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <string.h>
-
-#include "types.h"
-
-#include "JavaArray.h"
-#include "JavaClass.h"
-#include "JavaObject.h"
-#include "JavaTypes.h"
-#include "JavaThread.h"
-#include "Jnjvm.h"
-#include "NativeUtil.h"
-
-using namespace jnjvm;
-
-extern "C" {
-
-JNIEXPORT jobject JNICALL Java_java_lang_VMObject_clone(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
- jobject _src) {
-
- JavaObject* src = (JavaObject*)_src;
- CommonClass* cl = src->classOf;
- uint64 size = 0;
- if (cl->isArray) {
- size = sizeof(JavaArray) + ((JavaArray*)src)->size *
- ((ClassArray*)cl)->baseClass()->virtualSize;
- } else {
- size = cl->virtualSize;
- }
- JavaObject* res = (JavaObject*)
- JavaThread::get()->isolate->allocateObject(size, src->getVirtualTable());
- memcpy(res, src, size);
- res->lock = 0;
- return (jobject)res;
-}
-
-JNIEXPORT jobject JNICALL Java_java_lang_VMObject_getClass(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
- jobject _obj) {
- JavaObject* obj = (JavaObject*)_obj;
- return (jobject)(obj->classOf->getClassDelegatee());
-}
-
-JNIEXPORT void JNICALL Java_java_lang_VMObject_notifyAll(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-
- jobject _obj) {
- JavaObject* obj = (JavaObject*)_obj;
- obj->notifyAll();
-}
-
-
-JNIEXPORT void JNICALL Java_java_lang_VMObject_wait(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jobject _object, jlong ms, jint ns) {
- uint32 sec = (uint32) (ms / 1000);
- uint32 usec = (ns / 1000) + 1000 * (ms % 1000);
- JavaObject* obj = (JavaObject*)_object;
- if (sec || usec) {
- struct timeval t;
- t.tv_sec = sec;
- t.tv_usec = usec;
- obj->timedWait(t);
- } else {
- obj->wait();
- }
-}
-
-JNIEXPORT void JNICALL Java_java_lang_VMObject_notify(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jobject obj) {
- ((JavaObject*)obj)->notify();
-}
-
-}
Added: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMObject.cpp.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMObject.cpp.inc?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMObject.cpp.inc (added)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMObject.cpp.inc Wed Jun 25 04:59:39 2008
@@ -0,0 +1,99 @@
+//===------ ClasspathVMObject.cpp - GNU classpath java/lang/VMObject ------===//
+//
+// JnJVM
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <string.h>
+
+#include "types.h"
+
+#include "JavaArray.h"
+#include "JavaClass.h"
+#include "JavaObject.h"
+#include "JavaTypes.h"
+#include "JavaThread.h"
+#include "Jnjvm.h"
+#include "NativeUtil.h"
+
+using namespace jnjvm;
+
+extern "C" {
+
+JNIEXPORT jobject JNICALL Java_java_lang_VMObject_clone(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+ jobject _src) {
+
+ JavaObject* src = (JavaObject*)_src;
+ CommonClass* cl = src->classOf;
+ uint64 size = 0;
+ if (cl->isArray) {
+ size = sizeof(JavaArray) + ((JavaArray*)src)->size *
+ ((ClassArray*)cl)->baseClass()->virtualSize;
+ } else {
+ size = cl->virtualSize;
+ }
+ JavaObject* res = (JavaObject*)
+ JavaThread::get()->isolate->allocateObject(size, src->getVirtualTable());
+ memcpy(res, src, size);
+ res->lock = 0;
+ return (jobject)res;
+}
+
+JNIEXPORT jobject JNICALL Java_java_lang_VMObject_getClass(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+ jobject _obj) {
+ JavaObject* obj = (JavaObject*)_obj;
+ return (jobject)(obj->classOf->getClassDelegatee());
+}
+
+JNIEXPORT void JNICALL Java_java_lang_VMObject_notifyAll(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+
+ jobject _obj) {
+ JavaObject* obj = (JavaObject*)_obj;
+ obj->notifyAll();
+}
+
+
+JNIEXPORT void JNICALL Java_java_lang_VMObject_wait(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jobject _object, jlong ms, jint ns) {
+ uint32 sec = (uint32) (ms / 1000);
+ uint32 usec = (ns / 1000) + 1000 * (ms % 1000);
+ JavaObject* obj = (JavaObject*)_object;
+ if (sec || usec) {
+ struct timeval t;
+ t.tv_sec = sec;
+ t.tv_usec = usec;
+ obj->timedWait(t);
+ } else {
+ obj->wait();
+ }
+}
+
+JNIEXPORT void JNICALL Java_java_lang_VMObject_notify(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jobject obj) {
+ ((JavaObject*)obj)->notify();
+}
+
+}
Removed: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp (removed)
@@ -1,174 +0,0 @@
-//===------ ClasspathVMRuntime.cpp - GNU classpath java/lang/VMRuntime ----===//
-//
-// JnJVM
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <dlfcn.h>
-#include <string.h>
-
-#include "MvmGC.h"
-
-#include "types.h"
-
-#include "JavaArray.h"
-#include "JavaClass.h"
-#include "JavaObject.h"
-#include "JavaString.h"
-#include "JavaTypes.h"
-#include "JavaThread.h"
-#include "Jnjvm.h"
-#include "NativeUtil.h"
-
-
-using namespace jnjvm;
-
-extern "C" {
-
-
-JNIEXPORT jobject JNICALL Java_java_lang_VMRuntime_mapLibraryName(
-#ifdef NATIVE_JNI
-JNIEnv *env,
- jclass clazz,
-#endif
- jobject _strLib) {
- JavaString* strLib = (JavaString*)_strLib;
- Jnjvm* vm = JavaThread::get()->isolate;
-
- const UTF8* utf8Lib = strLib->value;
- uint32 stLib = strLib->offset;
- sint32 lgLib = strLib->count;
- sint32 lgPre = vm->prelib->size;
- sint32 lgPost = vm->postlib->size;
-
- uint32 size = (uint32)(lgPre + lgLib + lgPost);
- uint16* elements = (uint16*)alloca(size * sizeof(uint16));
-
- memmove(elements, vm->prelib->elements, lgPre * sizeof(uint16));
- memmove(&(elements[lgPre]), &(utf8Lib->elements[stLib]), lgLib * sizeof(uint16));
- memmove(&(elements[lgPre + lgLib]), vm->postlib->elements, lgPost * sizeof(uint16));
-
- const UTF8* res = vm->readerConstructUTF8(elements, size);
-
- return (jobject)(vm->UTF8ToStr(res));
-
-}
-
-typedef int (*onLoad_t)(const void**, void*);
-
-JNIEXPORT jint JNICALL Java_java_lang_VMRuntime_nativeLoad(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
- jobject _str,
- jobject _loader) {
- JavaString* str = (JavaString*)_str;
-#ifndef SERVICE_VM
- Jnjvm* vm = JavaThread::get()->isolate;
-#else
- Jnjvm* vm = Jnjvm::bootstrapVM;
-#endif
-
- char* buf = str->strToAsciiz();
-
- void* res = dlopen(buf, RTLD_LAZY | RTLD_LOCAL);
- if (res != 0) {
- vm->nativeLibs.push_back(res);
- onLoad_t onLoad = (onLoad_t)dlsym(res, "JNI_OnLoad");
- if (onLoad) onLoad(&vm->javavmEnv, 0);
- return 1;
- } else {
- return 0;
- }
-}
-
-
-JNIEXPORT void JNICALL Java_java_lang_VMRuntime_gc(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-) {
-#ifdef MULTIPLE_GC
- mvm::Thread::get()->GC->collect();
-#else
- Collector::collect();
-#endif
-}
-
-JNIEXPORT void JNICALL Java_java_lang_VMRuntime_runFinalization(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-) {
- return;
-}
-
-JNIEXPORT void JNICALL Java_java_lang_VMRuntime_runFinalizationForExit(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-) {
- return;
-}
-
-JNIEXPORT void JNICALL Java_java_lang_VMRuntime_exit(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jint par1) {
-#ifndef MULTIPLE_VM
- exit(par1);
-#else
- // TODO: do a longjmp
- exit(par1);
-#endif
-}
-
-JNIEXPORT jlong Java_java_lang_VMRuntime_freeMemory(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-) {
-#ifdef MULTIPLE_GC
- return (jlong)mvm::Thread::get()->GC->getFreeMemory();
-#else
- return (jlong)Collector::getFreeMemory();
-#endif
-}
-
-JNIEXPORT jlong Java_java_lang_VMRuntime_totalMemory(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-) {
-#ifdef MULTIPLE_GC
- return (jlong)mvm::Thread::get()->GC->getTotalMemory();
-#else
- return (jlong)Collector::getTotalMemory();
-#endif
-}
-
-JNIEXPORT jlong Java_java_lang_VMRuntime_maxMemory(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-) {
-#ifdef MULTIPLE_GC
- return (jlong)mvm::Thread::get()->GC->getMaxMemory();
-#else
- return (jlong)Collector::getMaxMemory();
-#endif
-}
-
-}
Added: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp.inc?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp.inc (added)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp.inc Wed Jun 25 04:59:39 2008
@@ -0,0 +1,174 @@
+//===------ ClasspathVMRuntime.cpp - GNU classpath java/lang/VMRuntime ----===//
+//
+// JnJVM
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <dlfcn.h>
+#include <string.h>
+
+#include "MvmGC.h"
+
+#include "types.h"
+
+#include "JavaArray.h"
+#include "JavaClass.h"
+#include "JavaObject.h"
+#include "JavaString.h"
+#include "JavaTypes.h"
+#include "JavaThread.h"
+#include "Jnjvm.h"
+#include "NativeUtil.h"
+
+
+using namespace jnjvm;
+
+extern "C" {
+
+
+JNIEXPORT jobject JNICALL Java_java_lang_VMRuntime_mapLibraryName(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+ jclass clazz,
+#endif
+ jobject _strLib) {
+ JavaString* strLib = (JavaString*)_strLib;
+ Jnjvm* vm = JavaThread::get()->isolate;
+
+ const UTF8* utf8Lib = strLib->value;
+ uint32 stLib = strLib->offset;
+ sint32 lgLib = strLib->count;
+ sint32 lgPre = vm->prelib->size;
+ sint32 lgPost = vm->postlib->size;
+
+ uint32 size = (uint32)(lgPre + lgLib + lgPost);
+ uint16* elements = (uint16*)alloca(size * sizeof(uint16));
+
+ memmove(elements, vm->prelib->elements, lgPre * sizeof(uint16));
+ memmove(&(elements[lgPre]), &(utf8Lib->elements[stLib]), lgLib * sizeof(uint16));
+ memmove(&(elements[lgPre + lgLib]), vm->postlib->elements, lgPost * sizeof(uint16));
+
+ const UTF8* res = vm->readerConstructUTF8(elements, size);
+
+ return (jobject)(vm->UTF8ToStr(res));
+
+}
+
+typedef int (*onLoad_t)(const void**, void*);
+
+JNIEXPORT jint JNICALL Java_java_lang_VMRuntime_nativeLoad(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+ jobject _str,
+ jobject _loader) {
+ JavaString* str = (JavaString*)_str;
+#ifndef SERVICE_VM
+ Jnjvm* vm = JavaThread::get()->isolate;
+#else
+ Jnjvm* vm = Jnjvm::bootstrapVM;
+#endif
+
+ char* buf = str->strToAsciiz();
+
+ void* res = dlopen(buf, RTLD_LAZY | RTLD_LOCAL);
+ if (res != 0) {
+ vm->nativeLibs.push_back(res);
+ onLoad_t onLoad = (onLoad_t)dlsym(res, "JNI_OnLoad");
+ if (onLoad) onLoad(&vm->javavmEnv, 0);
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+
+JNIEXPORT void JNICALL Java_java_lang_VMRuntime_gc(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+) {
+#ifdef MULTIPLE_GC
+ mvm::Thread::get()->GC->collect();
+#else
+ Collector::collect();
+#endif
+}
+
+JNIEXPORT void JNICALL Java_java_lang_VMRuntime_runFinalization(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+) {
+ return;
+}
+
+JNIEXPORT void JNICALL Java_java_lang_VMRuntime_runFinalizationForExit(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+) {
+ return;
+}
+
+JNIEXPORT void JNICALL Java_java_lang_VMRuntime_exit(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jint par1) {
+#ifndef MULTIPLE_VM
+ exit(par1);
+#else
+ // TODO: do a longjmp
+ exit(par1);
+#endif
+}
+
+JNIEXPORT jlong Java_java_lang_VMRuntime_freeMemory(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+) {
+#ifdef MULTIPLE_GC
+ return (jlong)mvm::Thread::get()->GC->getFreeMemory();
+#else
+ return (jlong)Collector::getFreeMemory();
+#endif
+}
+
+JNIEXPORT jlong Java_java_lang_VMRuntime_totalMemory(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+) {
+#ifdef MULTIPLE_GC
+ return (jlong)mvm::Thread::get()->GC->getTotalMemory();
+#else
+ return (jlong)Collector::getTotalMemory();
+#endif
+}
+
+JNIEXPORT jlong Java_java_lang_VMRuntime_maxMemory(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+) {
+#ifdef MULTIPLE_GC
+ return (jlong)mvm::Thread::get()->GC->getMaxMemory();
+#else
+ return (jlong)Collector::getMaxMemory();
+#endif
+}
+
+}
Removed: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp (removed)
@@ -1,91 +0,0 @@
-//===- ClasspathVMStackWalker.cpp -----------------------------------------===//
-//===------------ GNU classpath gnu/classpath/VMStackWalker ---------------===//
-//
-// JnJVM
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <string.h>
-
-#include "types.h"
-
-#include "mvm/JIT.h"
-
-#include "JavaArray.h"
-#include "JavaClass.h"
-#include "JavaJIT.h"
-#include "JavaObject.h"
-#include "JavaTypes.h"
-#include "JavaThread.h"
-#include "JavaUpcalls.h"
-#include "Jnjvm.h"
-#include "NativeUtil.h"
-
-using namespace jnjvm;
-
-extern "C" {
-
-ArrayObject* recGetClassContext(int** stack, uint32 size, uint32 first, uint32 rec) {
- if (size != first) {
- JavaMethod* meth = JavaJIT::IPToJavaMethod(stack[first]);
- if (meth) {
- ArrayObject* res = recGetClassContext(stack, size, first + 1, rec + 1);
- res->elements[rec] = meth->classDef->getClassDelegatee();
- return res;
- } else {
- return recGetClassContext(stack, size, first + 1, rec);
- }
- } else {
- Jnjvm* vm = JavaThread::get()->isolate;
- return ArrayObject::acons(rec, Classpath::classArrayClass, vm);
- }
-}
-
-JNIEXPORT jobject JNICALL Java_gnu_classpath_VMStackWalker_getClassContext(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-) {
- int* ips[100];
- int real_size = mvm::jit::getBacktrace((void**)(void*)ips, 100);
- int i = 0;
- int first = 0;
- CommonClass* cl = Classpath::vmStackWalker;
-
- while (i < real_size) {
- JavaMethod* meth = JavaJIT::IPToJavaMethod(ips[i++]);
- if (meth && meth->classDef == cl) {
- first = i;
- break;
- }
- }
-
- return (jobject)recGetClassContext(ips, real_size, first, 0);
-}
-
-JNIEXPORT jobject JNICALL Java_gnu_classpath_VMStackWalker_getClassLoader(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jclass _Cl) {
- JavaObject* Cl = (JavaObject*)_Cl;
- CommonClass* cl = (CommonClass*)Classpath::vmdataClass->getVirtualObjectField(Cl);
- return (jobject)cl->classLoader;
-}
-
-extern "C" JavaObject* getCallingClass() {
- Class* cl = JavaJIT::getCallingClass();
- if (cl) return cl->getClassDelegatee();
- return 0;
-}
-
-extern "C" JavaObject* getCallingClassLoader() {
- return JavaJIT::getCallingClassLoader();
-}
-
-}
Added: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp.inc?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp.inc (added)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp.inc Wed Jun 25 04:59:39 2008
@@ -0,0 +1,91 @@
+//===- ClasspathVMStackWalker.cpp -----------------------------------------===//
+//===------------ GNU classpath gnu/classpath/VMStackWalker ---------------===//
+//
+// JnJVM
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <string.h>
+
+#include "types.h"
+
+#include "mvm/JIT.h"
+
+#include "JavaArray.h"
+#include "JavaClass.h"
+#include "JavaJIT.h"
+#include "JavaObject.h"
+#include "JavaTypes.h"
+#include "JavaThread.h"
+#include "JavaUpcalls.h"
+#include "Jnjvm.h"
+#include "NativeUtil.h"
+
+using namespace jnjvm;
+
+extern "C" {
+
+ArrayObject* recGetClassContext(int** stack, uint32 size, uint32 first, uint32 rec) {
+ if (size != first) {
+ JavaMethod* meth = JavaJIT::IPToJavaMethod(stack[first]);
+ if (meth) {
+ ArrayObject* res = recGetClassContext(stack, size, first + 1, rec + 1);
+ res->elements[rec] = meth->classDef->getClassDelegatee();
+ return res;
+ } else {
+ return recGetClassContext(stack, size, first + 1, rec);
+ }
+ } else {
+ Jnjvm* vm = JavaThread::get()->isolate;
+ return ArrayObject::acons(rec, Classpath::classArrayClass, vm);
+ }
+}
+
+JNIEXPORT jobject JNICALL Java_gnu_classpath_VMStackWalker_getClassContext(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+) {
+ int* ips[100];
+ int real_size = mvm::jit::getBacktrace((void**)(void*)ips, 100);
+ int i = 0;
+ int first = 0;
+ CommonClass* cl = Classpath::vmStackWalker;
+
+ while (i < real_size) {
+ JavaMethod* meth = JavaJIT::IPToJavaMethod(ips[i++]);
+ if (meth && meth->classDef == cl) {
+ first = i;
+ break;
+ }
+ }
+
+ return (jobject)recGetClassContext(ips, real_size, first, 0);
+}
+
+JNIEXPORT jobject JNICALL Java_gnu_classpath_VMStackWalker_getClassLoader(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jclass _Cl) {
+ JavaObject* Cl = (JavaObject*)_Cl;
+ CommonClass* cl = (CommonClass*)Classpath::vmdataClass->getVirtualObjectField(Cl);
+ return (jobject)cl->classLoader;
+}
+
+extern "C" JavaObject* getCallingClass() {
+ Class* cl = JavaJIT::getCallingClass();
+ if (cl) return cl->getClassDelegatee();
+ return 0;
+}
+
+extern "C" JavaObject* getCallingClassLoader() {
+ return JavaJIT::getCallingClassLoader();
+}
+
+}
Removed: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp (removed)
@@ -1,109 +0,0 @@
-//===-- ClasspathVMSystem.cpp - GNU classpath java/lang/VMSystem ----------===//
-//
-// JnJVM
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <string.h>
-
-#include "types.h"
-
-#include "JavaArray.h"
-#include "JavaClass.h"
-#include "JavaObject.h"
-#include "JavaTypes.h"
-#include "JavaThread.h"
-#include "Jnjvm.h"
-#include "NativeUtil.h"
-
-using namespace jnjvm;
-
-extern "C" {
-
-JNIEXPORT void JNICALL Java_java_lang_VMSystem_arraycopy(
-#ifdef NATIVE_JNI
-JNIEnv *env,
- jclass _cl,
-#endif
- jobject _src,
- jint sstart,
- jobject _dst,
- jint dstart,
- jint len) {
- jnjvm::Jnjvm *vm = JavaThread::get()->isolate;
- JavaArray* src = (JavaArray*)_src;
- JavaArray* dst = (JavaArray*)_dst;
-
- verifyNull(src);
- verifyNull(dst);
-
- if (!(src->classOf->isArray && dst->classOf->isArray)) {
- vm->arrayStoreException();
- }
-
- ClassArray* ts = (ClassArray*)src->classOf;
- ClassArray* td = (ClassArray*)dst->classOf;
- CommonClass* dstType = td->baseClass();
- AssessorDesc* dstFuncs = td->funcs();
- AssessorDesc* srcFuncs = ts->funcs();
- CommonClass* srcPrim = srcFuncs->classType;
- CommonClass* dstPrim = dstFuncs->classType;
-
- if (len > src->size) {
- vm->indexOutOfBounds(src, len);
- } else if (len > dst->size) {
- vm->indexOutOfBounds(dst, len);
- } else if (len + sstart > src->size) {
- vm->indexOutOfBounds(src, len + sstart);
- } else if (len + dstart > dst->size) {
- vm->indexOutOfBounds(dst, len + dstart);
- } else if (dstart < 0) {
- vm->indexOutOfBounds(dst, dstart);
- } else if (sstart < 0) {
- vm->indexOutOfBounds(src, sstart);
- } else if (len < 0) {
- vm->indexOutOfBounds(src, len);
- } else if (srcPrim != dstPrim) {
- vm->arrayStoreException();
- }
-
- jint i = sstart;
- bool doThrow = false;
- if (srcFuncs->doTrace) {
- while (i < sstart + len && !doThrow) {
- JavaObject* cur = ((ArrayObject*)src)->elements[i];
- if (cur) {
- if (!(cur->classOf->isAssignableFrom(dstType))) {
- doThrow = true;
- len = i;
- }
- }
- ++i;
- }
- }
-
- uint32 size = srcFuncs->nbb;
- if (size == 0) size = sizeof(void*);
- void* ptrDst = (void*)((int64_t)(dst->elements) + size * dstart);
- void* ptrSrc = (void*)((int64_t)(src->elements) + size * sstart);
- memmove(ptrDst, ptrSrc, size * len);
-
- if (doThrow)
- vm->arrayStoreException();
-
-
-}
-
-JNIEXPORT jint JNICALL Java_java_lang_VMSystem_identityHashCode(
-#ifdef NATIVE_JNI
-JNIEnv *env,
- jclass clazz,
-#endif
- jobject obj) {
- return (jint)(intptr_t)obj;
-}
-
-}
Added: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp.inc?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp.inc (added)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp.inc Wed Jun 25 04:59:39 2008
@@ -0,0 +1,109 @@
+//===-- ClasspathVMSystem.cpp - GNU classpath java/lang/VMSystem ----------===//
+//
+// JnJVM
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <string.h>
+
+#include "types.h"
+
+#include "JavaArray.h"
+#include "JavaClass.h"
+#include "JavaObject.h"
+#include "JavaTypes.h"
+#include "JavaThread.h"
+#include "Jnjvm.h"
+#include "NativeUtil.h"
+
+using namespace jnjvm;
+
+extern "C" {
+
+JNIEXPORT void JNICALL Java_java_lang_VMSystem_arraycopy(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+ jclass _cl,
+#endif
+ jobject _src,
+ jint sstart,
+ jobject _dst,
+ jint dstart,
+ jint len) {
+ jnjvm::Jnjvm *vm = JavaThread::get()->isolate;
+ JavaArray* src = (JavaArray*)_src;
+ JavaArray* dst = (JavaArray*)_dst;
+
+ verifyNull(src);
+ verifyNull(dst);
+
+ if (!(src->classOf->isArray && dst->classOf->isArray)) {
+ vm->arrayStoreException();
+ }
+
+ ClassArray* ts = (ClassArray*)src->classOf;
+ ClassArray* td = (ClassArray*)dst->classOf;
+ CommonClass* dstType = td->baseClass();
+ AssessorDesc* dstFuncs = td->funcs();
+ AssessorDesc* srcFuncs = ts->funcs();
+ CommonClass* srcPrim = srcFuncs->classType;
+ CommonClass* dstPrim = dstFuncs->classType;
+
+ if (len > src->size) {
+ vm->indexOutOfBounds(src, len);
+ } else if (len > dst->size) {
+ vm->indexOutOfBounds(dst, len);
+ } else if (len + sstart > src->size) {
+ vm->indexOutOfBounds(src, len + sstart);
+ } else if (len + dstart > dst->size) {
+ vm->indexOutOfBounds(dst, len + dstart);
+ } else if (dstart < 0) {
+ vm->indexOutOfBounds(dst, dstart);
+ } else if (sstart < 0) {
+ vm->indexOutOfBounds(src, sstart);
+ } else if (len < 0) {
+ vm->indexOutOfBounds(src, len);
+ } else if (srcPrim != dstPrim) {
+ vm->arrayStoreException();
+ }
+
+ jint i = sstart;
+ bool doThrow = false;
+ if (srcFuncs->doTrace) {
+ while (i < sstart + len && !doThrow) {
+ JavaObject* cur = ((ArrayObject*)src)->elements[i];
+ if (cur) {
+ if (!(cur->classOf->isAssignableFrom(dstType))) {
+ doThrow = true;
+ len = i;
+ }
+ }
+ ++i;
+ }
+ }
+
+ uint32 size = srcFuncs->nbb;
+ if (size == 0) size = sizeof(void*);
+ void* ptrDst = (void*)((int64_t)(dst->elements) + size * dstart);
+ void* ptrSrc = (void*)((int64_t)(src->elements) + size * sstart);
+ memmove(ptrDst, ptrSrc, size * len);
+
+ if (doThrow)
+ vm->arrayStoreException();
+
+
+}
+
+JNIEXPORT jint JNICALL Java_java_lang_VMSystem_identityHashCode(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+ jclass clazz,
+#endif
+ jobject obj) {
+ return (jint)(intptr_t)obj;
+}
+
+}
Removed: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystemProperties.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystemProperties.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystemProperties.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystemProperties.cpp (removed)
@@ -1,128 +0,0 @@
-//===- ClasspathVMSystem/Properties.cpp -----------------------------------===//
-//===--------------------- GNU classpath gnu/classpath/VMSystemProperties -===//
-//
-// JnJVM
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <string.h>
-#include <sys/utsname.h>
-
-#include "types.h"
-
-#include "JavaArray.h"
-#include "JavaClass.h"
-#include "JavaObject.h"
-#include "JavaTypes.h"
-#include "JavaThread.h"
-#include "JavaUpcalls.h"
-#include "Jnjvm.h"
-#include "NativeUtil.h"
-
-using namespace jnjvm;
-
-extern "C" {
-
-static void setProperty(Jnjvm* vm, JavaObject* prop, const char* key,
- const char* val) {
- Classpath::setProperty->invokeIntSpecial(vm, prop, vm->asciizToStr(key),
- vm->asciizToStr(val));
-}
-
-static void setUnameProp(Jnjvm* vm, JavaObject* prop) {
- struct utsname infos;
- uname(&infos);
- setProperty(vm, prop, "os.name", infos.sysname);
- setProperty(vm, prop, "os.arch", infos.machine);
- setProperty(vm, prop, "os.version", infos.release);
- if (!strcmp(infos.machine, "ppc")) {
- setProperty(vm, prop, "gnu.cpu.endian","big");
- } else {
- setProperty(vm, prop, "gnu.cpu.endian","little");
- }
-}
-
-JNIEXPORT void JNICALL Java_gnu_classpath_VMSystemProperties_preInit(
-
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-jobject _prop) {
-
- JavaObject* prop = (JavaObject*)_prop;
- Jnjvm* vm = JavaThread::get()->isolate;
- const char* tmp;
- setProperty(vm, prop, "java.vm.specification.version", "1.0");
- setProperty(vm, prop, "java.vm.specification.vendor", "Sun Microsystems, Inc");
- setProperty(vm, prop, "java.vm.specification.name", "Java Virtual Machine Specification");
- setProperty(vm, prop, "java.specification.version", "1.5");
- setProperty(vm, prop, "java.specification.vendor", "Sun Microsystems, Inc");
- setProperty(vm, prop, "java.specification.name", "Java Platform API Specification");
- setProperty(vm, prop, "java.version", "1.5");
- setProperty(vm, prop, "java.runtime.version", "1.5");
- setProperty(vm, prop, "java.vendor", "VVM Project");
- setProperty(vm, prop, "java.vendor.url", "http://vvm.lip6.fr");
-
- tmp = getenv("JAVA_HOME");
- if (!tmp) tmp = "";
- setProperty(vm, prop, "java.home", tmp);
-
- setProperty(vm, prop, "java.class.version", "49.0");
- setProperty(vm, prop, "java.class.path", vm->classpath);
- setProperty(vm, prop, "java.boot.class.path", vm->bootClasspathEnv);
- setProperty(vm, prop, "sun.boot.class.path", vm->bootClasspathEnv);
- setProperty(vm, prop, "java.vm.version", "2.0");
- setProperty(vm, prop, "java.vm.vendor", "VVM Project");
- setProperty(vm, prop, "java.vm.name", "JnJVM");
- setProperty(vm, prop, "java.specification.version", "1.5");
- setProperty(vm, prop, "java.library.path", vm->libClasspathEnv);
- setProperty(vm, prop, "java.io.tmpdir", "/tmp");
-
- tmp = getenv("JAVA_COMPILER");
- if (!tmp) tmp = "gcj";
- setProperty(vm, prop, "java.compiler", tmp);
-
- setProperty(vm, prop, "build.compiler", "gcj");
- setProperty(vm, prop, "gcj.class.path", vm->bootClasspathEnv);
-
- setUnameProp(vm, prop);
-
- setProperty(vm, prop, "file.separator", vm->dirSeparator);
- setProperty(vm, prop, "path.separator", vm->envSeparator);
- setProperty(vm, prop, "line.separator", "\n");
-
- tmp = getenv("USERNAME");
- if (!tmp) tmp = getenv("LOGNAME");
- else if (!tmp) tmp = getenv("NAME");
- else if (!tmp) tmp = "";
- setProperty(vm, prop, "user.name", tmp);
-
- tmp = getenv("HOME");
- if (!tmp) tmp = "";
- setProperty(vm, prop, "user.home", tmp);
-
- tmp = getenv("PWD");
- if (!tmp) tmp = "";
- setProperty(vm, prop, "user.dir", tmp);
-
- //setProperty(vm, prop, "gnu.classpath.nio.charset.provider.iconv", "true")
-
- setProperty(vm, prop, "file.encoding", "ISO8859_1");
- setProperty(vm, prop, "gnu.java.util.zoneinfo.dir", "/usr/share/zoneinfo");
-
-
-}
-
-extern "C" void propertiesPostInit(JavaObject* prop) {
- Jnjvm* vm = JavaThread::get()->isolate;
- for (std::vector<std::pair<char*, char*> >::iterator i = vm->postProperties.begin(),
- e = vm->postProperties.end(); i!= e; i++) {
- setProperty(vm, prop, i->first, i->second);
- }
-}
-
-}
Added: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystemProperties.cpp.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystemProperties.cpp.inc?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystemProperties.cpp.inc (added)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystemProperties.cpp.inc Wed Jun 25 04:59:39 2008
@@ -0,0 +1,128 @@
+//===- ClasspathVMSystem/Properties.cpp -----------------------------------===//
+//===--------------------- GNU classpath gnu/classpath/VMSystemProperties -===//
+//
+// JnJVM
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <string.h>
+#include <sys/utsname.h>
+
+#include "types.h"
+
+#include "JavaArray.h"
+#include "JavaClass.h"
+#include "JavaObject.h"
+#include "JavaTypes.h"
+#include "JavaThread.h"
+#include "JavaUpcalls.h"
+#include "Jnjvm.h"
+#include "NativeUtil.h"
+
+using namespace jnjvm;
+
+extern "C" {
+
+static void setProperty(Jnjvm* vm, JavaObject* prop, const char* key,
+ const char* val) {
+ Classpath::setProperty->invokeIntSpecial(vm, prop, vm->asciizToStr(key),
+ vm->asciizToStr(val));
+}
+
+static void setUnameProp(Jnjvm* vm, JavaObject* prop) {
+ struct utsname infos;
+ uname(&infos);
+ setProperty(vm, prop, "os.name", infos.sysname);
+ setProperty(vm, prop, "os.arch", infos.machine);
+ setProperty(vm, prop, "os.version", infos.release);
+ if (!strcmp(infos.machine, "ppc")) {
+ setProperty(vm, prop, "gnu.cpu.endian","big");
+ } else {
+ setProperty(vm, prop, "gnu.cpu.endian","little");
+ }
+}
+
+JNIEXPORT void JNICALL Java_gnu_classpath_VMSystemProperties_preInit(
+
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jobject _prop) {
+
+ JavaObject* prop = (JavaObject*)_prop;
+ Jnjvm* vm = JavaThread::get()->isolate;
+ const char* tmp;
+ setProperty(vm, prop, "java.vm.specification.version", "1.0");
+ setProperty(vm, prop, "java.vm.specification.vendor", "Sun Microsystems, Inc");
+ setProperty(vm, prop, "java.vm.specification.name", "Java Virtual Machine Specification");
+ setProperty(vm, prop, "java.specification.version", "1.5");
+ setProperty(vm, prop, "java.specification.vendor", "Sun Microsystems, Inc");
+ setProperty(vm, prop, "java.specification.name", "Java Platform API Specification");
+ setProperty(vm, prop, "java.version", "1.5");
+ setProperty(vm, prop, "java.runtime.version", "1.5");
+ setProperty(vm, prop, "java.vendor", "VVM Project");
+ setProperty(vm, prop, "java.vendor.url", "http://vvm.lip6.fr");
+
+ tmp = getenv("JAVA_HOME");
+ if (!tmp) tmp = "";
+ setProperty(vm, prop, "java.home", tmp);
+
+ setProperty(vm, prop, "java.class.version", "49.0");
+ setProperty(vm, prop, "java.class.path", vm->classpath);
+ setProperty(vm, prop, "java.boot.class.path", vm->bootClasspathEnv);
+ setProperty(vm, prop, "sun.boot.class.path", vm->bootClasspathEnv);
+ setProperty(vm, prop, "java.vm.version", "2.0");
+ setProperty(vm, prop, "java.vm.vendor", "VVM Project");
+ setProperty(vm, prop, "java.vm.name", "JnJVM");
+ setProperty(vm, prop, "java.specification.version", "1.5");
+ setProperty(vm, prop, "java.library.path", vm->libClasspathEnv);
+ setProperty(vm, prop, "java.io.tmpdir", "/tmp");
+
+ tmp = getenv("JAVA_COMPILER");
+ if (!tmp) tmp = "gcj";
+ setProperty(vm, prop, "java.compiler", tmp);
+
+ setProperty(vm, prop, "build.compiler", "gcj");
+ setProperty(vm, prop, "gcj.class.path", vm->bootClasspathEnv);
+
+ setUnameProp(vm, prop);
+
+ setProperty(vm, prop, "file.separator", vm->dirSeparator);
+ setProperty(vm, prop, "path.separator", vm->envSeparator);
+ setProperty(vm, prop, "line.separator", "\n");
+
+ tmp = getenv("USERNAME");
+ if (!tmp) tmp = getenv("LOGNAME");
+ else if (!tmp) tmp = getenv("NAME");
+ else if (!tmp) tmp = "";
+ setProperty(vm, prop, "user.name", tmp);
+
+ tmp = getenv("HOME");
+ if (!tmp) tmp = "";
+ setProperty(vm, prop, "user.home", tmp);
+
+ tmp = getenv("PWD");
+ if (!tmp) tmp = "";
+ setProperty(vm, prop, "user.dir", tmp);
+
+ //setProperty(vm, prop, "gnu.classpath.nio.charset.provider.iconv", "true")
+
+ setProperty(vm, prop, "file.encoding", "ISO8859_1");
+ setProperty(vm, prop, "gnu.java.util.zoneinfo.dir", "/usr/share/zoneinfo");
+
+
+}
+
+extern "C" void propertiesPostInit(JavaObject* prop) {
+ Jnjvm* vm = JavaThread::get()->isolate;
+ for (std::vector<std::pair<char*, char*> >::iterator i = vm->postProperties.begin(),
+ e = vm->postProperties.end(); i!= e; i++) {
+ setProperty(vm, prop, i->first, i->second);
+ }
+}
+
+}
Removed: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp (removed)
@@ -1,200 +0,0 @@
-//===- ClasspathVMThread.cpp - GNU classpath java/lang/VMThread -----------===//
-//
-// JnJVM
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <string.h>
-
-#include "types.h"
-
-#include "mvm/Threads/Thread.h"
-
-#include "JavaArray.h"
-#include "JavaClass.h"
-#include "JavaIsolate.h"
-#include "JavaJIT.h"
-#include "JavaObject.h"
-#include "JavaTypes.h"
-#include "JavaThread.h"
-#include "JavaUpcalls.h"
-#include "Jnjvm.h"
-#include "NativeUtil.h"
-
-#ifdef SERVICE_VM
-#include "ServiceDomain.h"
-#endif
-
-using namespace jnjvm;
-
-extern "C" {
-
-JNIEXPORT jobject JNICALL Java_java_lang_VMThread_currentThread(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz
-#endif
-) {
- return (jobject)(JavaThread::currentThread());
-}
-
-typedef struct arg_thread_t {
- JavaObject* vmThread;
- JavaThread* intern;
-}arg_thread_t;
-
-static void start(arg_thread_t* arg) {
- int argc;
- JavaObject* vmThread = arg->vmThread;
- JavaThread* intern = arg->intern;
- free(arg);
- mvm::Thread::threadKey->set(intern);
-#ifdef MULTIPLE_GC
- intern->GC->inject_my_thread(&argc);
-#else
- Collector::inject_my_thread(&argc);
-#endif
- CommonClass* vmthClass = vmThread->classOf;
- JavaObject* thread = ClasspathThread::assocThread->getVirtualObjectField(vmThread);
- JavaIsolate* isolate = (JavaIsolate*)(intern->isolate);
- ThreadSystem* ts = isolate->threadSystem;
- bool isDaemon = ClasspathThread::daemon->getVirtualInt8Field(thread);
- intern->threadID = (mvm::Thread::self() << 8) & 0x7FFFFF00;
-
-
- if (!isDaemon) {
- ts->nonDaemonLock->lock();
- ts->nonDaemonThreads++;
- ts->nonDaemonLock->unlock();
- }
-
-#ifdef SERVICE_VM
- ServiceDomain* vm = (ServiceDomain*)isolate;
- vm->startExecution();
- vm->lock->lock();
- vm->numThreads++;
- vm->lock->unlock();
-#endif
- JavaMethod* method = vmthClass->lookupMethod(Jnjvm::runName, Jnjvm::clinitType, ACC_VIRTUAL, true);
- method->invokeIntSpecial(isolate, vmThread);
-
-
- if (!isDaemon) {
- ts->nonDaemonLock->lock();
- ts->nonDaemonThreads--;
- if (ts->nonDaemonThreads == 0)
- ts->nonDaemonVar->signal();
- ts->nonDaemonLock->unlock();
- }
-
-#ifdef SERVICE_VM
- vm->lock->lock();
- vm->numThreads--;
- vm->lock->unlock();
-#endif
-
-#ifdef MULTIPLE_GC
- intern->GC->remove_my_thread();
-#else
- Collector::remove_my_thread();
-#endif
-}
-
-JNIEXPORT void JNICALL Java_java_lang_VMThread_start(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject _vmThread, sint64 stackSize) {
- JavaObject* vmThread = (JavaObject*)_vmThread;
- JavaObject* javaThread = ClasspathThread::assocThread->getVirtualObjectField(vmThread);
- assert(javaThread);
- Jnjvm* vm = JavaThread::get()->isolate;
-
- JavaThread* th = vm_new(vm, JavaThread)();
- th->initialise(javaThread, vm);
- ClasspathThread::vmdata->setVirtualObjectField(vmThread, (JavaObject*)th);
- int tid = 0;
- arg_thread_t* arg = (arg_thread_t*)malloc(sizeof(arg_thread_t));
- arg->intern = th;
- arg->vmThread = vmThread;
-#ifdef MULTIPLE_GC
- th->GC = mvm::Thread::get()->GC;
-#endif
-
- mvm::Thread::start(&tid, (int (*)(void *))start, (void*)arg);
-}
-
-JNIEXPORT void JNICALL Java_java_lang_VMThread_interrupt(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject _vmthread) {
- JavaObject* vmthread = (JavaObject*)_vmthread;
-
- while (ClasspathThread::vmdata->getVirtualObjectField(vmthread) == 0)
- mvm::Thread::yield();
-
- JavaThread* th = (JavaThread*)ClasspathThread::vmdata->getVirtualObjectField(vmthread);
- th->lock->lock();
- th->interruptFlag = 1;
-
- // here we could also raise a signal for interrupting I/O
- if (th->state == JavaThread::StateWaiting) {
- th->state = JavaThread::StateInterrupted;
- th->varcond->signal();
- }
-
- th->lock->unlock();
-}
-
-JNIEXPORT jboolean JNICALL Java_java_lang_VMThread_interrupted(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-) {
- JavaThread* th = JavaThread::get();
- uint32 interrupt = th->interruptFlag;
- th->interruptFlag = 0;
- return (jboolean)interrupt;
-}
-
-JNIEXPORT jboolean JNICALL Java_java_lang_VMThread_isInterrupted(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject _vmthread) {
- JavaObject* vmthread = (JavaObject*)_vmthread;
- JavaThread* th = (JavaThread*)ClasspathThread::vmdata->getVirtualObjectField(vmthread);
- return (jboolean)th->interruptFlag;
-}
-
-JNIEXPORT void JNICALL Java_java_lang_VMThread_nativeSetPriority(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject vmthread, jint prio) {
- // Currently not implemented
-}
-
-JNIEXPORT void JNICALL Java_java_lang_VMThread_nativeStop(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject vmthread, jobject exc) {
- // Currently not implemented
-}
-
-JNIEXPORT void JNICALL Java_java_lang_VMThread_yield(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
-) {
- mvm::Thread::yield();
-}
-
-}
Added: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp.inc?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp.inc (added)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp.inc Wed Jun 25 04:59:39 2008
@@ -0,0 +1,200 @@
+//===- ClasspathVMThread.cpp - GNU classpath java/lang/VMThread -----------===//
+//
+// JnJVM
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <string.h>
+
+#include "types.h"
+
+#include "mvm/Threads/Thread.h"
+
+#include "JavaArray.h"
+#include "JavaClass.h"
+#include "JavaIsolate.h"
+#include "JavaJIT.h"
+#include "JavaObject.h"
+#include "JavaTypes.h"
+#include "JavaThread.h"
+#include "JavaUpcalls.h"
+#include "Jnjvm.h"
+#include "NativeUtil.h"
+
+#ifdef SERVICE_VM
+#include "ServiceDomain.h"
+#endif
+
+using namespace jnjvm;
+
+extern "C" {
+
+JNIEXPORT jobject JNICALL Java_java_lang_VMThread_currentThread(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz
+#endif
+) {
+ return (jobject)(JavaThread::currentThread());
+}
+
+typedef struct arg_thread_t {
+ JavaObject* vmThread;
+ JavaThread* intern;
+}arg_thread_t;
+
+static void start(arg_thread_t* arg) {
+ int argc;
+ JavaObject* vmThread = arg->vmThread;
+ JavaThread* intern = arg->intern;
+ free(arg);
+ mvm::Thread::threadKey->set(intern);
+#ifdef MULTIPLE_GC
+ intern->GC->inject_my_thread(&argc);
+#else
+ Collector::inject_my_thread(&argc);
+#endif
+ CommonClass* vmthClass = vmThread->classOf;
+ JavaObject* thread = ClasspathThread::assocThread->getVirtualObjectField(vmThread);
+ JavaIsolate* isolate = (JavaIsolate*)(intern->isolate);
+ ThreadSystem* ts = isolate->threadSystem;
+ bool isDaemon = ClasspathThread::daemon->getVirtualInt8Field(thread);
+ intern->threadID = (mvm::Thread::self() << 8) & 0x7FFFFF00;
+
+
+ if (!isDaemon) {
+ ts->nonDaemonLock->lock();
+ ts->nonDaemonThreads++;
+ ts->nonDaemonLock->unlock();
+ }
+
+#ifdef SERVICE_VM
+ ServiceDomain* vm = (ServiceDomain*)isolate;
+ vm->startExecution();
+ vm->lock->lock();
+ vm->numThreads++;
+ vm->lock->unlock();
+#endif
+ JavaMethod* method = vmthClass->lookupMethod(Jnjvm::runName, Jnjvm::clinitType, ACC_VIRTUAL, true);
+ method->invokeIntSpecial(isolate, vmThread);
+
+
+ if (!isDaemon) {
+ ts->nonDaemonLock->lock();
+ ts->nonDaemonThreads--;
+ if (ts->nonDaemonThreads == 0)
+ ts->nonDaemonVar->signal();
+ ts->nonDaemonLock->unlock();
+ }
+
+#ifdef SERVICE_VM
+ vm->lock->lock();
+ vm->numThreads--;
+ vm->lock->unlock();
+#endif
+
+#ifdef MULTIPLE_GC
+ intern->GC->remove_my_thread();
+#else
+ Collector::remove_my_thread();
+#endif
+}
+
+JNIEXPORT void JNICALL Java_java_lang_VMThread_start(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject _vmThread, sint64 stackSize) {
+ JavaObject* vmThread = (JavaObject*)_vmThread;
+ JavaObject* javaThread = ClasspathThread::assocThread->getVirtualObjectField(vmThread);
+ assert(javaThread);
+ Jnjvm* vm = JavaThread::get()->isolate;
+
+ JavaThread* th = vm_new(vm, JavaThread)();
+ th->initialise(javaThread, vm);
+ ClasspathThread::vmdata->setVirtualObjectField(vmThread, (JavaObject*)th);
+ int tid = 0;
+ arg_thread_t* arg = (arg_thread_t*)malloc(sizeof(arg_thread_t));
+ arg->intern = th;
+ arg->vmThread = vmThread;
+#ifdef MULTIPLE_GC
+ th->GC = mvm::Thread::get()->GC;
+#endif
+
+ mvm::Thread::start(&tid, (int (*)(void *))start, (void*)arg);
+}
+
+JNIEXPORT void JNICALL Java_java_lang_VMThread_interrupt(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject _vmthread) {
+ JavaObject* vmthread = (JavaObject*)_vmthread;
+
+ while (ClasspathThread::vmdata->getVirtualObjectField(vmthread) == 0)
+ mvm::Thread::yield();
+
+ JavaThread* th = (JavaThread*)ClasspathThread::vmdata->getVirtualObjectField(vmthread);
+ th->lock->lock();
+ th->interruptFlag = 1;
+
+ // here we could also raise a signal for interrupting I/O
+ if (th->state == JavaThread::StateWaiting) {
+ th->state = JavaThread::StateInterrupted;
+ th->varcond->signal();
+ }
+
+ th->lock->unlock();
+}
+
+JNIEXPORT jboolean JNICALL Java_java_lang_VMThread_interrupted(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+) {
+ JavaThread* th = JavaThread::get();
+ uint32 interrupt = th->interruptFlag;
+ th->interruptFlag = 0;
+ return (jboolean)interrupt;
+}
+
+JNIEXPORT jboolean JNICALL Java_java_lang_VMThread_isInterrupted(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject _vmthread) {
+ JavaObject* vmthread = (JavaObject*)_vmthread;
+ JavaThread* th = (JavaThread*)ClasspathThread::vmdata->getVirtualObjectField(vmthread);
+ return (jboolean)th->interruptFlag;
+}
+
+JNIEXPORT void JNICALL Java_java_lang_VMThread_nativeSetPriority(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject vmthread, jint prio) {
+ // Currently not implemented
+}
+
+JNIEXPORT void JNICALL Java_java_lang_VMThread_nativeStop(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject vmthread, jobject exc) {
+ // Currently not implemented
+}
+
+JNIEXPORT void JNICALL Java_java_lang_VMThread_yield(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+) {
+ mvm::Thread::yield();
+}
+
+}
Removed: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp (removed)
@@ -1,111 +0,0 @@
-//===- ClasspathVMClassLoader.cpp - GNU classpath java/lang/VMClassLoader -===//
-//
-// JnJVM
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <string.h>
-
-#include "types.h"
-
-#include "mvm/JIT.h"
-
-#include "JavaAccess.h"
-#include "JavaArray.h"
-#include "JavaClass.h"
-#include "JavaConstantPool.h"
-#include "JavaJIT.h"
-#include "JavaObject.h"
-#include "JavaString.h"
-#include "JavaTypes.h"
-#include "JavaThread.h"
-#include "JavaUpcalls.h"
-#include "Jnjvm.h"
-#include "NativeUtil.h"
-#include "Reader.h"
-
-using namespace jnjvm;
-
-extern "C" {
-
-JNIEXPORT jobject JNICALL Java_java_lang_VMThrowable_fillInStackTrace(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-jclass clazz,
-#endif
- jobject throwable) {
- //int** fp = (int**)__builtin_frame_address(0);
- Jnjvm* vm = JavaThread::get()->isolate;
- int** stack = (int**)malloc(sizeof(int*) * 100);
- int real_size = mvm::jit::getBacktrace((void**)stack, 100);
- stack[real_size] = 0;
- JavaObject* vmThrowable = Classpath::newVMThrowable->doNew(vm);
- ((JavaObject**)((uint64)vmThrowable + Classpath::vmDataVMThrowable->ptrOffset))[0] = (JavaObject*)stack;
- return (jobject)vmThrowable;
-}
-
-JavaObject* consStackElement(JavaMethod* meth, int* ip) {
- Jnjvm* vm = JavaThread::get()->isolate;
- JavaObject* methodName = vm->UTF8ToStr(meth->name);
- Class* cl = meth->classDef;
- JavaObject* className = vm->UTF8ToStr(cl->name->internalToJava(vm, 0, cl->name->size));
- JavaObject* sourceName = 0;
-
- Attribut* sourceAtt = cl->lookupAttribut(Attribut::sourceFileAttribut);
-
- if (sourceAtt) {
- Reader reader(sourceAtt, cl->bytes);
- uint16 index = reader.readU2();
- sourceName = vm->UTF8ToStr(cl->ctpInfo->UTF8At(index));
- }
-
- bool native = isNative(meth->access);
-
- JavaObject* res = (*Classpath::newStackTraceElement)(vm);
- Classpath::initStackTraceElement->invokeIntSpecial(vm, res, sourceName,
- (uint32)ip, className,
- methodName, native);
- return res;
-}
-
-ArrayObject* recGetStackTrace(int** stack, uint32 first, uint32 rec) {
- Jnjvm* vm = JavaThread::get()->isolate;
- if (stack[first] != 0) {
- JavaMethod* meth = JavaJIT::IPToJavaMethod(stack[first]);
- if (meth) {
- ArrayObject* res = recGetStackTrace(stack, first + 1, rec + 1);
- res->elements[rec] = consStackElement(meth, stack[first]);
- return res;
- } else {
- return recGetStackTrace(stack, first + 1, rec);
- }
- } else {
- return ArrayObject::acons(rec, JavaArray::ofObject, vm);
- }
-}
-
-JNIEXPORT jobject JNICALL Java_java_lang_VMThrowable_getStackTrace(
-#ifdef NATIVE_JNI
-JNIEnv *env,
-#endif
-jobject vmthrow, jobject throwable) {
- int** stack = (int**)Classpath::vmDataVMThrowable->getVirtualObjectField((JavaObject*)vmthrow);
- uint32 first = 0;
- sint32 i = 0;
-
- while (stack[i] != 0) {
- JavaMethod* meth = JavaJIT::IPToJavaMethod(stack[i++]);
- if (meth && !meth->classDef->subclassOf(Classpath::newThrowable)) {
- first = i - 1;
- break;
- }
- }
- jobject res = (jobject)recGetStackTrace((int**)(uint32**)stack, first, 0);
- free(stack);
- return res;
-}
-
-}
Added: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp.inc?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp.inc (added)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp.inc Wed Jun 25 04:59:39 2008
@@ -0,0 +1,111 @@
+//===- ClasspathVMClassLoader.cpp - GNU classpath java/lang/VMClassLoader -===//
+//
+// JnJVM
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <string.h>
+
+#include "types.h"
+
+#include "mvm/JIT.h"
+
+#include "JavaAccess.h"
+#include "JavaArray.h"
+#include "JavaClass.h"
+#include "JavaConstantPool.h"
+#include "JavaJIT.h"
+#include "JavaObject.h"
+#include "JavaString.h"
+#include "JavaTypes.h"
+#include "JavaThread.h"
+#include "JavaUpcalls.h"
+#include "Jnjvm.h"
+#include "NativeUtil.h"
+#include "Reader.h"
+
+using namespace jnjvm;
+
+extern "C" {
+
+JNIEXPORT jobject JNICALL Java_java_lang_VMThrowable_fillInStackTrace(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+ jobject throwable) {
+ //int** fp = (int**)__builtin_frame_address(0);
+ Jnjvm* vm = JavaThread::get()->isolate;
+ int** stack = (int**)malloc(sizeof(int*) * 100);
+ int real_size = mvm::jit::getBacktrace((void**)stack, 100);
+ stack[real_size] = 0;
+ JavaObject* vmThrowable = Classpath::newVMThrowable->doNew(vm);
+ ((JavaObject**)((uint64)vmThrowable + Classpath::vmDataVMThrowable->ptrOffset))[0] = (JavaObject*)stack;
+ return (jobject)vmThrowable;
+}
+
+JavaObject* consStackElement(JavaMethod* meth, int* ip) {
+ Jnjvm* vm = JavaThread::get()->isolate;
+ JavaObject* methodName = vm->UTF8ToStr(meth->name);
+ Class* cl = meth->classDef;
+ JavaObject* className = vm->UTF8ToStr(cl->name->internalToJava(vm, 0, cl->name->size));
+ JavaObject* sourceName = 0;
+
+ Attribut* sourceAtt = cl->lookupAttribut(Attribut::sourceFileAttribut);
+
+ if (sourceAtt) {
+ Reader reader(sourceAtt, cl->bytes);
+ uint16 index = reader.readU2();
+ sourceName = vm->UTF8ToStr(cl->ctpInfo->UTF8At(index));
+ }
+
+ bool native = isNative(meth->access);
+
+ JavaObject* res = (*Classpath::newStackTraceElement)(vm);
+ Classpath::initStackTraceElement->invokeIntSpecial(vm, res, sourceName,
+ (uint32)ip, className,
+ methodName, native);
+ return res;
+}
+
+ArrayObject* recGetStackTrace(int** stack, uint32 first, uint32 rec) {
+ Jnjvm* vm = JavaThread::get()->isolate;
+ if (stack[first] != 0) {
+ JavaMethod* meth = JavaJIT::IPToJavaMethod(stack[first]);
+ if (meth) {
+ ArrayObject* res = recGetStackTrace(stack, first + 1, rec + 1);
+ res->elements[rec] = consStackElement(meth, stack[first]);
+ return res;
+ } else {
+ return recGetStackTrace(stack, first + 1, rec);
+ }
+ } else {
+ return ArrayObject::acons(rec, JavaArray::ofObject, vm);
+ }
+}
+
+JNIEXPORT jobject JNICALL Java_java_lang_VMThrowable_getStackTrace(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+#endif
+jobject vmthrow, jobject throwable) {
+ int** stack = (int**)Classpath::vmDataVMThrowable->getVirtualObjectField((JavaObject*)vmthrow);
+ uint32 first = 0;
+ sint32 i = 0;
+
+ while (stack[i] != 0) {
+ JavaMethod* meth = JavaJIT::IPToJavaMethod(stack[i++]);
+ if (meth && !meth->classDef->subclassOf(Classpath::newThrowable)) {
+ first = i - 1;
+ break;
+ }
+ }
+ jobject res = (jobject)recGetStackTrace((int**)(uint32**)stack, first, 0);
+ free(stack);
+ return res;
+}
+
+}
Added: vmkit/trunk/lib/JnJVM/Classpath/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/Makefile (added)
+++ vmkit/trunk/lib/JnJVM/Classpath/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,14 @@
+##===- lib/JnJVM/Classpath/Makefile ------------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../../..
+
+LIBRARYNAME = Classpath
+include $(LEVEL)/Makefile.common
+
+CXX.Flags += -I../VMCore
Removed: vmkit/trunk/lib/JnJVM/Classpath/Makefile.am
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/Makefile.am?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/Makefile.am (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/Makefile.am (removed)
@@ -1,7 +0,0 @@
-lib_LTLIBRARIES = libClasspath.la
-
-PREFIX=@prefix@
-
-libClasspath_la_SOURCES = Classpath.cpp
-
-libClasspath_la_CXXFLAGS =-I../VMCore -DPREFIX=\"$(PREFIX)\" -W -Wall -ansi -Wno-unused-parameter -Wno-long-long -Wno-unused-function -fno-omit-frame-pointer -O2 -g -Werror
Added: vmkit/trunk/lib/JnJVM/LLVMRuntime/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/LLVMRuntime/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/LLVMRuntime/Makefile (added)
+++ vmkit/trunk/lib/JnJVM/LLVMRuntime/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,50 @@
+##===- lib/JnJVM/LLVMRuntime/Makefile ----------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../../..
+
+include $(LEVEL)/Makefile.common
+
+all = llvmruntime.cpp
+
+llvmruntimebc : llvmruntimell
+ $(Echo) "Building LLVM runtime with llvm-as"
+ $(Verb) $(LLVMAS) -f LLVMRuntime.ll
+
+all :: llvmruntimebc
+ $(Echo) "Building LLVM runtime with llc"
+ $(Verb) $(LLC) -march=cpp -cppgen=contents -f LLVMRuntime.bc
+
+LL_FILES = runtime-default.ll
+
+ifeq ($(ISOLATE_BUILD), 1)
+LL_FILES += runtime-isolate.ll
+endif
+
+ifeq ($(SERVICE_BUILD), 1)
+LL_FILES += runtime-service.ll runtime-isolate.ll runtime-multi-mmap.ll
+else
+ifeq ($(GC_MULTI_MMAP), 1)
+LL_FILES += runtime-multi-mmap.ll
+else
+ifeq ($(GC_SINGLE_MMAP), 1)
+LL_FILES += runtime-single-mmap.ll
+else
+ifeq ($(GC_BOEHM), 1)
+LL_FILES += runtime-boehm.ll
+endif
+endif
+endif
+endif
+
+llvmruntimell: $(LL_FILES)
+ $(Echo) "Generating LLVM runtime"
+ $(Verb) cat $(LL_FILES) > LLVMRuntime.ll
+
+clean::
+ rm -f LLVMRuntime.ll LLVMRuntime.bc LLVMRuntime.cpp
Removed: vmkit/trunk/lib/JnJVM/LLVMRuntime/Makefile.am
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/LLVMRuntime/Makefile.am?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/LLVMRuntime/Makefile.am (original)
+++ vmkit/trunk/lib/JnJVM/LLVMRuntime/Makefile.am (removed)
@@ -1,38 +0,0 @@
-all: llvmruntimecpp
-
-LLVMAS = @llvmprefix@/Release/bin/llvm-as
-LLC = @llvmprefix@/Release/bin/llc
-
-llvmruntimebc : llvmruntimell
- $(LLVMAS) -f LLVMRuntime.ll
-
-llvmruntimecpp : llvmruntimebc
- $(LLC) -march=cpp -cppgen=contents -f LLVMRuntime.bc
-
-LL_FILES = runtime-default.ll
-
-if ISOLATE_BUILD
-LL_FILES += runtime-isolate.ll
-endif
-
-if SERVICE_BUILD
-LL_FILES += runtime-service.ll runtime-isolate.ll runtime-multi-mmap.ll
-else
-if GC_MULTI_MMAP
-LL_FILES += runtime-multi-mmap.ll
-else
-if GC_SINGLE_MMAP
-LL_FILES += runtime-single-mmap.ll
-else
-if GC_BOEHM
-LL_FILES += runtime-boehm.ll
-endif
-endif
-endif
-endif
-
-llvmruntimell: $(LL_FILES)
- cat $(LL_FILES) > LLVMRuntime.ll
-
-clean:
- rm -f LLVMRuntime.ll LLVMRuntime.bc LLVMRuntime.cpp
Removed: vmkit/trunk/lib/JnJVM/Main.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Main.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Main.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Main.cpp (removed)
@@ -1,35 +0,0 @@
-//===--------- Main.cpp - Simple execution of JnJVM -----------------------===//
-//
-// JnJVM
-//
-// This file is distributed under the University of Pierre et Marie Curie
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "MvmGC.h"
-#include "mvm/JIT.h"
-#include "mvm/Object.h"
-#include "mvm/Threads/Thread.h"
-
-#include "llvm/Support/ManagedStatic.h"
-
-using namespace mvm;
-
-
-extern "C" int boot();
-extern "C" int start_app(int, char**);
-
-int main(int argc, char **argv, char **envp) {
- llvm::llvm_shutdown_obj X;
- int base;
-
- jit::initialise();
- Object::initialise();
- Thread::initialise();
- Collector::initialise(0, &base);
- boot();
- start_app(argc, argv);
-
- return 0;
-}
Added: vmkit/trunk/lib/JnJVM/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Makefile (added)
+++ vmkit/trunk/lib/JnJVM/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,14 @@
+##===- lib/JnJVM/Makefile ----------------------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../..
+
+DIRS = LLVMRuntime VMCore Classpath
+
+include $(LEVEL)/Makefile.common
+
Removed: vmkit/trunk/lib/JnJVM/Makefile.am
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Makefile.am?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/Makefile.am (original)
+++ vmkit/trunk/lib/JnJVM/Makefile.am (removed)
@@ -1,13 +0,0 @@
-# $Id: Makefile.am,v 1.6 2008/03/21 11:12:38 varth Exp $
-SUBDIRS = LLVMRuntime VMCore Classpath
-EXTRA_DIST = OpcodeNames.def
-bin_PROGRAMS = main
-#lib_LTLIBRARIES = libjnjvm.la
-
-main_SOURCES = ../Mvm/Object.cpp ../Mvm/Sigsegv.cpp Main.cpp ../Mvm/MvmMemoryManager.cpp ../Mvm/JIT.cpp ../Mvm/EscapeAnalysis.cpp
-main_CXXFLAGS = -DPREFIX=\"$(PREFIX)\" -W -Wall -ansi -Wno-unused-parameter -Wno-long-long -Wno-unused-function -fno-omit-frame-pointer -g -Werror -O2
-main_LDADD = VMCore/.libs/libJnJVM.a Classpath/.libs/libClasspath.a @GC_LIBS@ @GCTHREAD_LIBS@ @LLVMDYLIB@
-main_LDFLAGS = @rdynamic@
-
-#libjnjvm.la:
-# gcc -shared VMCore/.libs/libJnJVM.$(DYLIB_EXTENSION) Classpath/.libs/libClasspath.$(DYLIB_EXTENSION) -o libjnjvm.$(DYLIB_EXTENSION)
Removed: vmkit/trunk/lib/JnJVM/README
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/README?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/README (original)
+++ vmkit/trunk/lib/JnJVM/README (removed)
@@ -1,33 +0,0 @@
-1 - GNU Classpath
-Current version 0.97.1. Use ecj to compile Classpath.
-
- a - unzip classpath
- tar -xzf classpath-0.97.1
- b - compile classpath
- cd classpath-0.97.1
- ./configure --disable-plugin --disable-examples && make
-
-IMPORTANT: for local use
-cd classpath-x.y/lib;
-ln -s ../native/jni/gtk-peer/.libs/libgtkpeer.so;
-ln -s ../native/jni/gconf-peer/.libs/libgconfpeer.so;
-ln -s ../native/jni/java-io/.libs/libjavaio.so;
-ln -s ../native/jni/java-lang/.libs/libjavalangreflect.so;
-ln -s ../native/jni/java-lang/.libs/libjavalang.so;
-ln -s ../native/jni/java-net/.libs/libjavanet.so;
-ln -s ../native/jni/java-nio/.libs/libjavanio.so;
-ln -s ../native/jni/java-util/.libs/libjavautil.so;
-
-Or for Darwin
-ln -s ../native/jni/gtk-peer/.libs/libgtkpeer.dylib;
-ln -s ../native/jni/gconf-peer/.libs/libgconfpeer.dylib;
-ln -s ../native/jni/java-io/.libs/libjavaio.dylib;
-ln -s ../native/jni/java-lang/.libs/libjavalangreflect.dylib;
-ln -s ../native/jni/java-lang/.libs/libjavalang.dylib;
-ln -s ../native/jni/java-net/.libs/libjavanet.dylib;
-ln -s ../native/jni/java-nio/.libs/libjavanio.dylib;
-ln -s ../native/jni/java-util/.libs/libjavautil.dylib;
-
-
-2 - Run JnJVM
-./main HelloWorld
Added: vmkit/trunk/lib/JnJVM/README.txt
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/README.txt?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/README.txt (added)
+++ vmkit/trunk/lib/JnJVM/README.txt Wed Jun 25 04:59:39 2008
@@ -0,0 +1,29 @@
+GNU Classpath
+Current version 0.97.2. Use ecj to compile Classpath.
+
+ a - unzip classpath
+ tar -xzf classpath-0.97.2
+ b - compile classpath
+ cd classpath-0.97.2
+ ./configure --disable-plugin --disable-examples && make
+
+IMPORTANT: for local use
+cd classpath-x.y/lib;
+ln -s ../native/jni/gtk-peer/.libs/libgtkpeer.so;
+ln -s ../native/jni/gconf-peer/.libs/libgconfpeer.so;
+ln -s ../native/jni/java-io/.libs/libjavaio.so;
+ln -s ../native/jni/java-lang/.libs/libjavalangreflect.so;
+ln -s ../native/jni/java-lang/.libs/libjavalang.so;
+ln -s ../native/jni/java-net/.libs/libjavanet.so;
+ln -s ../native/jni/java-nio/.libs/libjavanio.so;
+ln -s ../native/jni/java-util/.libs/libjavautil.so;
+
+Or for Darwin
+ln -s ../native/jni/gtk-peer/.libs/libgtkpeer.dylib;
+ln -s ../native/jni/gconf-peer/.libs/libgconfpeer.dylib;
+ln -s ../native/jni/java-io/.libs/libjavaio.dylib;
+ln -s ../native/jni/java-lang/.libs/libjavalangreflect.dylib;
+ln -s ../native/jni/java-lang/.libs/libjavalang.dylib;
+ln -s ../native/jni/java-net/.libs/libjavanet.dylib;
+ln -s ../native/jni/java-nio/.libs/libjavanio.dylib;
+ln -s ../native/jni/java-util/.libs/libjavautil.dylib;
Removed: vmkit/trunk/lib/JnJVM/TODO
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/TODO?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/TODO (original)
+++ vmkit/trunk/lib/JnJVM/TODO (removed)
@@ -1,4 +0,0 @@
-Patch on getVirtualField
-Patch on newLookup
-
-Stubs are currently GC roots, make them isolate-objects
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaArray.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaArray.h?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaArray.h (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaArray.h Wed Jun 25 04:59:39 2008
@@ -27,7 +27,7 @@
class TJavaArray : public JavaObject {
public:
sint32 size;
- T elements[0];
+ T elements[1];
};
class JavaArray : public TJavaArray<void*> {
@@ -63,7 +63,7 @@
class name : public TJavaArray<elmt> { \
public: \
static name* acons(sint32 n, ClassArray* cl, Jnjvm* vm); \
- };
+ }
ARRAYCLASS(ArrayUInt8, uint8);
ARRAYCLASS(ArraySInt8, sint8);
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaBacktrace.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaBacktrace.cpp?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaBacktrace.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaBacktrace.cpp Wed Jun 25 04:59:39 2008
@@ -42,17 +42,17 @@
if (code) {
JavaMethod* meth = (JavaMethod*)code->getMetaInfo();
if (meth) {
- printf("; %p in %s\n", ips[n - 1], meth->printString());
+ printf("; %p in %s\n", (void*)ips[n - 1], meth->printString());
} else {
- printf("; %p in %s\n", ips[n - 1], "unknown");
+ printf("; %p in %s\n", (void*)ips[n - 1], "unknown");
}
} else {
Dl_info info;
int res = dladdr(ips[n++], &info);
if (res != 0) {
- printf("; %p in %s\n", ips[n - 1], info.dli_sname);
+ printf("; %p in %s\n", (void*)ips[n - 1], info.dli_sname);
} else {
- printf("; %p in Unknown\n", ips[n - 1]);
+ printf("; %p in Unknown\n", (void*)ips[n - 1]);
}
}
}
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp Wed Jun 25 04:59:39 2008
@@ -341,7 +341,7 @@
// The counter will not overflow, increment it.
Value* Add = BinaryOperator::createAdd(mvm::jit::constantOne, atomic, "",
currentBlock);
- new StoreInst(Add, lockPtr, "", currentBlock);
+ new StoreInst(Add, lockPtr, false, currentBlock);
BranchInst::Create(OK, currentBlock);
currentBlock = OverflowCounterBB;
@@ -385,7 +385,7 @@
// Locked once, set zero
currentBlock = LockedOnceBB;
- new StoreInst(mvm::jit::constantZero, lockPtr, currentBlock);
+ new StoreInst(mvm::jit::constantZero, lockPtr, false, currentBlock);
BranchInst::Create(EndUnlock, currentBlock);
currentBlock = NotLockedOnceBB;
@@ -403,7 +403,7 @@
// Decrement the counter.
Value* Sub = BinaryOperator::createSub(lock, mvm::jit::constantOne, "",
currentBlock);
- new StoreInst(Sub, lockPtr, currentBlock);
+ new StoreInst(Sub, lockPtr, false, currentBlock);
BranchInst::Create(EndUnlock, currentBlock);
currentBlock = FatLockBB;
@@ -833,13 +833,14 @@
func->setLinkage(GlobalValue::ExternalLinkage);
- /*
+
if (compilingMethod->name ==
compilingClass->isolate->asciizConstructUTF8("main")) {
llvmFunction->print(llvm::cout);
+ printf("\n");
void* res = mvm::jit::executionEngine->getPointerToGlobal(llvmFunction);
void* base = res;
- while (base < (void*)((char*)res + ((mvm::Code*)res)->objectSize())) {
+ while (base < (void*)((char*)res + 100)) {
printf("%08x\t", (unsigned)base);
int n= mvm::jit::disassemble((unsigned int *)base);
printf("\n");
@@ -848,7 +849,7 @@
printf("\n");
fflush(stdout);
}
- */
+
PRINT_DEBUG(JNJVM_COMPILE, 1, COLOR_NORMAL, "--> end compiling %s\n",
compilingMethod->printString());
@@ -1346,7 +1347,7 @@
nb++;
#endif
Args.reserve(nb + 2);
- Value* args[nb];
+ Value** args = (Value**)alloca(nb*sizeof(Value*));
#if defined(MULTIPLE_VM) || defined(MULTIPLE_GC)
args[nb - 1] = isolateLocal;
sint32 start = nb - 2;
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp Wed Jun 25 04:59:39 2008
@@ -2076,7 +2076,7 @@
LLVMCommonClassInfo* LCI = module->getClassInfo(dcl);
Value* valCl = LCI->getVar(this);
- Value* args[dim + 2];
+ Value** args = (Value**)alloca(sizeof(Value*) * (dim + 2));
args[0] = valCl;
args[1] = ConstantInt::get(Type::Int32Ty, dim);
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp Wed Jun 25 04:59:39 2008
@@ -269,7 +269,7 @@
extern "C" JavaArray* multiCallNew(ClassArray* cl, uint32 len, ...) {
va_list ap;
va_start(ap, len);
- sint32 dims[len];
+ sint32* dims = (sint32*)alloca(sizeof(sint32) * len);
for (uint32 i = 0; i < len; ++i){
dims[i] = va_arg(ap, int);
}
Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp Wed Jun 25 04:59:39 2008
@@ -41,7 +41,7 @@
Jnjvm* Jnjvm::bootstrapVM = 0;
#define DEF_UTF8(var) \
- const UTF8* Jnjvm::var = 0;
+ const UTF8* Jnjvm::var = 0
DEF_UTF8(initName);
DEF_UTF8(clinitName);
Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp Wed Jun 25 04:59:39 2008
@@ -350,7 +350,8 @@
const Type* LLVMClassInfo::getVirtualType() {
if (!virtualType) {
std::vector<const llvm::Type*> fields;
- JavaField* array[classDef->virtualFields.size()];
+ JavaField** array =
+ (JavaField**)alloca(sizeof(JavaField*) * classDef->virtualFields.size());
if (classDef->super) {
LLVMClassInfo* CLI =
@@ -401,7 +402,8 @@
if (!staticType) {
Class* cl = (Class*)classDef;
std::vector<const llvm::Type*> fields;
- JavaField* array[classDef->staticFields.size() + 1];
+ JavaField** array = (JavaField**)
+ alloca(sizeof(JavaField*) * (classDef->staticFields.size() + 1));
fields.push_back(JnjvmModule::JavaObjectType->getContainedType(0));
for (CommonClass::field_iterator i = classDef->staticFields.begin(),
Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp Wed Jun 25 04:59:39 2008
@@ -204,6 +204,7 @@
addPass(PM, createGVNPass()); // Remove redundancies
addPass(PM, createMemCpyOptPass()); // Remove memcpy / form memset
addPass(PM, createSCCPPass()); // Constant prop with SCCP
+ addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
addPass(PM, mvm::createEscapeAnalysisPass(JnjvmModule::JavaObjectAllocateFunction));
addPass(PM, mvm::createLowerConstantCallsPass());
Modified: vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h Wed Jun 25 04:59:39 2008
@@ -95,7 +95,7 @@
}
- virtual void print(mvm::PrintBuffer* buf) {
+ virtual void print(mvm::PrintBuffer* buf) const {
buf->write("Hashtable<>");
}
Added: vmkit/trunk/lib/JnJVM/VMCore/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/Makefile (added)
+++ vmkit/trunk/lib/JnJVM/VMCore/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,14 @@
+##===- lib/JnJVM/VMCore/Makefile ---------------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../../..
+
+LIBRARYNAME = JnJVM
+include $(LEVEL)/Makefile.common
+
+CXX.Flags += -I../LLVMRuntime $(CLASSPATH_FLAGS)
Removed: vmkit/trunk/lib/JnJVM/VMCore/Makefile.am
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Makefile.am?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/Makefile.am (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/Makefile.am (removed)
@@ -1,22 +0,0 @@
-EXTRA_DIST = OpcodeNames.def
-lib_LTLIBRARIES = libJnJVM.la
-
-PREFIX=@prefix@
-
-libJnJVM_la_SOURCES = \
- JavaAccess.h JavaArray.cpp JavaArray.h JavaClass.cpp JavaClass.h \
- JavaConstantPool.cpp JavaConstantPool.h JavaJIT.cpp JavaJIT.h JavaObject.cpp \
- JavaObject.h JavaThread.cpp JavaThread.h \
- JavaTypes.cpp JavaTypes.h Jnjvm.cpp Jnjvm.h Reader.cpp Reader.h \
- Zip.h Zip.cpp types.h debug.h VirtualTables.cpp LockedMap.h LockedMap.cpp \
- JavaIsolate.h JavaIsolate.cpp JavaString.h JavaString.cpp JavaInitialise.cpp JavaJITOpcodes.cpp \
- JavaBacktrace.cpp NativeUtil.h NativeUtil.cpp Jni.cpp \
- JavaCache.h JavaCache.cpp JavaUpcalls.h JavaUpcalls.cpp \
- JnjvmModuleProvider.h JnjvmModuleProvider.cpp JavaRuntimeJIT.cpp JavaMetaJIT.cpp \
- LowerConstantCalls.cpp JnjvmModule.h JnjvmModule.cpp
-
-if SERVICE_BUILD
-libJnJVM_la_SOURCES += ServiceDomain.cpp
-endif
-
-libJnJVM_la_CXXFLAGS =-DPREFIX=\"$(PREFIX)\" -W -Wall -ansi -Wno-unused-parameter -Wno-long-long -Wno-unused-function -fno-omit-frame-pointer -g -Werror -O2 -I../LLVMRuntime
Modified: vmkit/trunk/lib/JnJVM/VMCore/ServiceDomain.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/ServiceDomain.cpp?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/ServiceDomain.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/ServiceDomain.cpp Wed Jun 25 04:59:39 2008
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#ifdef SERVICE_VM
#include "mvm/JIT.h"
#include "JavaJIT.h"
@@ -200,3 +201,5 @@
mvm::GCThreadCollector* cur = mvm::GCCollector::threads->myloc();
cur->meta = this;
}
+
+#endif
Added: vmkit/trunk/lib/Main.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Main.cpp?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/Main.cpp (added)
+++ vmkit/trunk/lib/Main.cpp Wed Jun 25 04:59:39 2008
@@ -0,0 +1,35 @@
+//===--------- Main.cpp - Simple execution of JnJVM -----------------------===//
+//
+// JnJVM
+//
+// This file is distributed under the University of Pierre et Marie Curie
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "MvmGC.h"
+#include "mvm/JIT.h"
+#include "mvm/Object.h"
+#include "mvm/Threads/Thread.h"
+
+#include "llvm/Support/ManagedStatic.h"
+
+using namespace mvm;
+
+
+extern "C" int boot();
+extern "C" int start_app(int, char**);
+
+int main(int argc, char **argv, char **envp) {
+ llvm::llvm_shutdown_obj X;
+ int base;
+
+ jit::initialise();
+ Object::initialise();
+ Thread::initialise();
+ Collector::initialise(0, &base);
+ boot();
+ start_app(argc, argv);
+
+ return 0;
+}
Added: vmkit/trunk/lib/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/Makefile (added)
+++ vmkit/trunk/lib/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,15 @@
+##===- lib/Makefile ----------------------------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ..
+
+PARALLEL_DIRS = Mvm JnJVM N3
+LIBRARYNAME = Main
+
+include $(LEVEL)/Makefile.common
+
Propchange: vmkit/trunk/lib/Makefile
------------------------------------------------------------------------------
svn:executable = *
Removed: vmkit/trunk/lib/Mvm/Allocator/.cvsignore
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Allocator/.cvsignore?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/Allocator/.cvsignore (original)
+++ vmkit/trunk/lib/Mvm/Allocator/.cvsignore (removed)
@@ -1,14 +0,0 @@
-allocator
-*.d
-Makefile
-Makefile.in
-.deps
-.libs
-*.a
-*.o
-*.la
-*.lo
-*.class
-*.stamp
-
-mainuvm_alloc
Added: vmkit/trunk/lib/Mvm/Allocator/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Allocator/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/Allocator/Makefile (added)
+++ vmkit/trunk/lib/Mvm/Allocator/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,13 @@
+##===- lib/Mvm/Allocator/Makefile --------------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../../..
+
+LIBRARYNAME = Allocator
+include $(LEVEL)/Makefile.common
+
Removed: vmkit/trunk/lib/Mvm/Allocator/Makefile.am
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Allocator/Makefile.am?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/Allocator/Makefile.am (original)
+++ vmkit/trunk/lib/Mvm/Allocator/Makefile.am (removed)
@@ -1,11 +0,0 @@
-noinst_LIBRARIES = libuvm_alloc.a
-noinst_PROGRAMS = mainuvm_alloc
-
-libuvm_alloc_a_SOURCES = gcalloc.cpp gcalloc.h gcchunk.cpp gcchunk.h gcerror.cpp gcerror.h gcmapper.cpp gcmapper.h osdep.h
-libuvm_alloc_a_CXXFLAGS = -O2 -W -Wall -Werror -ansi -pedantic -Wno-variadic-macros -Wno-unused-parameter
-
-mainuvm_alloc_SOURCES = main.cpp
-mainuvm_alloc_CXXFLAGS =
-mainuvm_alloc_LDADD = libuvm_alloc.a
-
-CLEANFILES = *~ *.bak .*.sw?
Removed: vmkit/trunk/lib/Mvm/Allocator/README
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Allocator/README?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/Allocator/README (original)
+++ vmkit/trunk/lib/Mvm/Allocator/README (removed)
@@ -1,130 +0,0 @@
-##############################################################################
-#
-# Micro-VM Allocator
-# by Charles Clément, corrected by Gaël Thomas.
-#
-##############################################################################
-
-
-I Memory layout
- 1 Exponantial area
- 2 Linear area
- 3 Mmap area
-II Structure
- 1 Referencing memory chunks
- 2 Harsh tables
-III Internal memory management
-
-I Memory layout
-#--------------
-
-Based on the size of the objects to allocate, the allocator chooses between
-three distincts area.
-i) The exponantial area for objects less than max_exp bytes
-ii) The linear area for x in max_exp < x < max_lin bytes
-iii) The mmap area for LIN bytes < x
-
-Max_exp and max_lin are actually defined to 32 and 8192 bytes.
-
-I.1 Exponantial area:
-Objects stored in that area are allocated 2^n bytes, the smallest power of two
-in which the object can fit.
-
--------------------------------------
-| Size to allocate | reserved space |
--------------------------------------
- 1 2
- 2 2
- 3 4
- 4 4
- {5,6,7,8} 8
- {9-16} 16
- {17-32} 32
-
--> Size of allocated chunk in this area grows exponantially.
-With max_exp = 32 bytes
-
-I.2 Linear area:
-In the linear area, the size needed to be allocated is rounded to the next
-max_exp multiple. This is to reduce memory loss, as otherwise, with the
-previous technique allocating 260 bytes would induce to occupy a 512 bytes
-area.
-
- ------------------------------------
- | 32 | 64 | 96 | 128 | ...
- ------------------------------------
-
-max_exp*1 *2 *3 *4
-
--> Size of allocated chunk in this area grows linearly.
-
-I.3 Mmap area:
-For objects larger than 2^13 (8192) bytes, a number of physical page is
-associated, thus a multiplier of 4096 bytes.
-
-
-II Descriptors
-#-------------
-
-II.1 Hash tables:
-
-In order to keep track of allocated memory adresses, we need to store the
-adresses that we allocated. This is a requirement for the garbage collector, as
-the compatibility with the C ABI implies that a memory reference is
-indistinguishable from a value. Hence, every page descriptor is inserted in a
-hash table when allocated.
-This has a limitation, as it is not possible to make the difference between a
-value in the heap that would point to an actual allocated space in memory if
-translated into a pointer.
-
-
-II.2 Referencing memory chunks:
-Here is the representation of an adress in memory :
-
- ----------------------------------------------------------
-Pointer: | Table Entry | Page Descriptor | Index |
- ----------------------------------------------------------
- | __ | |
- | | | | |
- | |__| | |
- | | | GCHashSet \|/ |
- | |__| __ __ __ __ __ __ |
- --->| |----->|__|__|__|__|__|__| |
- |__| | |
- | | | GCPage \|/
- |__| | __ __ __ __ __ __
- GCHash ---->|__|__|__|__|__|__| Headers
-
-
-Memory is separated in spaces. Each space contains memory chunk of the same
-size. When the allocator needs to allocate n bytes, it choose a memory space
-in an exponential, linear or mmaped space and round n to the size of this
-space. This technique is used to construct a performant hashtable of all
-allocated memory chunks, which is used to identify pointer during a collection
-(the garbage collector is only conservative).
-
-The first bits of a memory chunk pointer reference an entry in GCHash, and
-the next bits reference an entry in GCHashSet. Each entry in GCHashSet is a
-GCPage structure, which describes a set of contiguous pages (a memory space).
-
-The GCPage Class holds a field (GCChunkNode*)_headers containing the list to
-all headers of free chunks of the space. It also holds the size of the space
-in _chunk_nbb. This size is the rounded size (exp or linear) of all memory
-chunks managed in this space.
-
-_Note_:
-This is not the case for space allocated in the mmap area, whose page
-descriptor holds directly the header itself.
-
-A header is described by the class GCChunkNode. It holds the size _nbb_mark of
-memory chunks in the last 29 bits (the 3 last ones are used by the garbage
-collector to set the *color* of the chunk). GCChunkNode are stored in a
-circular double linked list.
-
-
-III Internal memory management
-#-----------------------------
-
-The allocator has to allocate its memmory structures itself. It is responsible
-to allocate the memory for the micro-vm and the structures needed to manage
-and access the allocated areas.
Added: vmkit/trunk/lib/Mvm/Allocator/README.txt
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Allocator/README.txt?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/Allocator/README.txt (added)
+++ vmkit/trunk/lib/Mvm/Allocator/README.txt Wed Jun 25 04:59:39 2008
@@ -0,0 +1,130 @@
+##############################################################################
+#
+# Micro-VM Allocator
+# by Charles Clément, corrected by Gaël Thomas.
+#
+##############################################################################
+
+
+I Memory layout
+ 1 Exponantial area
+ 2 Linear area
+ 3 Mmap area
+II Structure
+ 1 Referencing memory chunks
+ 2 Harsh tables
+III Internal memory management
+
+I Memory layout
+#--------------
+
+Based on the size of the objects to allocate, the allocator chooses between
+three distincts area.
+i) The exponantial area for objects less than max_exp bytes
+ii) The linear area for x in max_exp < x < max_lin bytes
+iii) The mmap area for LIN bytes < x
+
+Max_exp and max_lin are actually defined to 32 and 8192 bytes.
+
+I.1 Exponantial area:
+Objects stored in that area are allocated 2^n bytes, the smallest power of two
+in which the object can fit.
+
+-------------------------------------
+| Size to allocate | reserved space |
+-------------------------------------
+ 1 2
+ 2 2
+ 3 4
+ 4 4
+ {5,6,7,8} 8
+ {9-16} 16
+ {17-32} 32
+
+-> Size of allocated chunk in this area grows exponantially.
+With max_exp = 32 bytes
+
+I.2 Linear area:
+In the linear area, the size needed to be allocated is rounded to the next
+max_exp multiple. This is to reduce memory loss, as otherwise, with the
+previous technique allocating 260 bytes would induce to occupy a 512 bytes
+area.
+
+ ------------------------------------
+ | 32 | 64 | 96 | 128 | ...
+ ------------------------------------
+
+max_exp*1 *2 *3 *4
+
+-> Size of allocated chunk in this area grows linearly.
+
+I.3 Mmap area:
+For objects larger than 2^13 (8192) bytes, a number of physical page is
+associated, thus a multiplier of 4096 bytes.
+
+
+II Descriptors
+#-------------
+
+II.1 Hash tables:
+
+In order to keep track of allocated memory adresses, we need to store the
+adresses that we allocated. This is a requirement for the garbage collector, as
+the compatibility with the C ABI implies that a memory reference is
+indistinguishable from a value. Hence, every page descriptor is inserted in a
+hash table when allocated.
+This has a limitation, as it is not possible to make the difference between a
+value in the heap that would point to an actual allocated space in memory if
+translated into a pointer.
+
+
+II.2 Referencing memory chunks:
+Here is the representation of an adress in memory :
+
+ ----------------------------------------------------------
+Pointer: | Table Entry | Page Descriptor | Index |
+ ----------------------------------------------------------
+ | __ | |
+ | | | | |
+ | |__| | |
+ | | | GCHashSet \|/ |
+ | |__| __ __ __ __ __ __ |
+ --->| |----->|__|__|__|__|__|__| |
+ |__| | |
+ | | | GCPage \|/
+ |__| | __ __ __ __ __ __
+ GCHash ---->|__|__|__|__|__|__| Headers
+
+
+Memory is separated in spaces. Each space contains memory chunk of the same
+size. When the allocator needs to allocate n bytes, it choose a memory space
+in an exponential, linear or mmaped space and round n to the size of this
+space. This technique is used to construct a performant hashtable of all
+allocated memory chunks, which is used to identify pointer during a collection
+(the garbage collector is only conservative).
+
+The first bits of a memory chunk pointer reference an entry in GCHash, and
+the next bits reference an entry in GCHashSet. Each entry in GCHashSet is a
+GCPage structure, which describes a set of contiguous pages (a memory space).
+
+The GCPage Class holds a field (GCChunkNode*)_headers containing the list to
+all headers of free chunks of the space. It also holds the size of the space
+in _chunk_nbb. This size is the rounded size (exp or linear) of all memory
+chunks managed in this space.
+
+_Note_:
+This is not the case for space allocated in the mmap area, whose page
+descriptor holds directly the header itself.
+
+A header is described by the class GCChunkNode. It holds the size _nbb_mark of
+memory chunks in the last 29 bits (the 3 last ones are used by the garbage
+collector to set the *color* of the chunk). GCChunkNode are stored in a
+circular double linked list.
+
+
+III Internal memory management
+#-----------------------------
+
+The allocator has to allocate its memmory structures itself. It is responsible
+to allocate the memory for the micro-vm and the structures needed to manage
+and access the allocated areas.
Removed: vmkit/trunk/lib/Mvm/Allocator/main.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Allocator/main.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/Allocator/main.cpp (original)
+++ vmkit/trunk/lib/Mvm/Allocator/main.cpp (removed)
@@ -1,123 +0,0 @@
-//===------------------ main.cc - Mvm allocator ---------------------------===//
-//
-// Mvm
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "gcalloc.h"
-#include <stdio.h>
-#include <time.h>
-#include <stdlib.h>
-#include <math.h>
-#include <sys/time.h>
-
-unsigned int rand(unsigned int min, unsigned int max) {
- return (unsigned int)nearbyint((((double)(max - min))*::rand())/(RAND_MAX + 1.0)) + min;
-}
-
-void tire(size_t n, size_t *vals, size_t *reallocs, size_t *frees) {
- for(size_t i=0; i<n; i++) {
- if(rand(0, 20))
- vals[i] = rand(1, 256);
- else
- vals[i] = rand(256, 65536);
- if(!rand(0, 10)) /* un chance sur 10 de réallouer */
- if(rand(0, 20))
- reallocs[i] = rand(1, 256);
- else
- reallocs[i] = rand(256, 65536);
- else
- reallocs[i] = 0;
- if(rand(0, 10)) /* un chance sur 10 de ne pas libérer */
- frees[i] = 1;
- else
- frees[i] = 0;
- }
-}
-
-void printMesure(size_t n, size_t *vals, size_t *reallocs, size_t *frees, struct timeval *start, struct timeval *end) {
- size_t totAllocated = 0;
- size_t curAllocated = 0;
- size_t na = 0;
- size_t nr = 0;
- size_t nf = 0;
- size_t no = 0;
-
- for(size_t i=0; i<n; i++) {
- size_t here = vals[i] + reallocs[i];
- if(reallocs[i]) {
- na++;
- nr++;
- }
- na++;
- totAllocated += here;
- if(!frees[i]) {
- curAllocated += here;
- no++;
- } else
- nf++;
- }
-
- printf("; %d allocations (%d reallocations, %d free, %d chunks)\n", na, nr, nf, no);
- printf("; Allocated: %d bytes, current %d bytes\n", totAllocated, curAllocated);
-
- struct timeval diff;
- timersub(end, start, &diff);
- double f = (double)diff.tv_sec + ((double)diff.tv_usec / 1000000.0);
- printf("; time consumed: %fs\n", f);
-}
-
-void mesureAllocateur() {
- size_t n = 512*1024;
- size_t vals[n];
- size_t reallocs[n];
- size_t frees[n];
-
- printf("Tire une sequence d'allocations alléatoire\n");
- tire(n, vals, reallocs, frees);
-
- printf("test\n");
- struct timeval start;
- struct timeval end;
- GCAllocator *a = new GCAllocator();
-
- gettimeofday(&start, 0);
- for(size_t i=0; i<n; i++) {
- void *p = a->alloc(vals[i]);
- if(reallocs[i])
- p = a->realloc(p, reallocs[i]);
- if(frees[i])
- a->free(p);
- }
- gettimeofday(&end, 0);
- delete a;
-
- printMesure(n, vals, reallocs, frees, &start, &end);
- printf("Press a key...\n");
- getchar();
-
- gettimeofday(&start, 0);
- for(size_t i=0; i<n; i++) {
- void *p = malloc(vals[i]);
- ((char *)p)[0] = 1;
- if(reallocs[i])
- p = realloc(p, reallocs[i]);
- if(frees[i])
- free(p);
- }
- gettimeofday(&end, 0);
- printMesure(n, vals, reallocs, frees, &start, &end);
- printf("Press a key...\n");
- getchar();
-
-}
-
-int main(int argc, char **argv) {
- mesureAllocateur();
-
- GCHash::destroy();
- return 0;
-}
Added: vmkit/trunk/lib/Mvm/BoehmGC/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/BoehmGC/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/BoehmGC/Makefile (added)
+++ vmkit/trunk/lib/Mvm/BoehmGC/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,13 @@
+##===- lib/JnJVM/VMCore/Makefile ---------------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../../..
+
+LIBRARYNAME = BoehmGC
+include $(LEVEL)/Makefile.common
+
Removed: vmkit/trunk/lib/Mvm/BoehmGC/Makefile.am
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/BoehmGC/Makefile.am?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/BoehmGC/Makefile.am (original)
+++ vmkit/trunk/lib/Mvm/BoehmGC/Makefile.am (removed)
@@ -1,6 +0,0 @@
-noinst_LIBRARIES = libuvm_gc_boehm.a
-
-libuvm_gc_boehm_a_SOURCES = gc.cpp
-libuvm_gc_boehm_a_CXXFLAGS = -O2 -W -Wall -ansi -pedantic -Wno-unused-parameter -Wno-variadic-macros
-
-CLEANFILES = *~ *.bak .*.sw?
Added: vmkit/trunk/lib/Mvm/CommonThread/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommonThread/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/CommonThread/Makefile (added)
+++ vmkit/trunk/lib/Mvm/CommonThread/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,13 @@
+##===- lib/Mvm/CommonThread/Makefile -----------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../../..
+
+LIBRARYNAME = CommonThread
+include $(LEVEL)/Makefile.common
+
Removed: vmkit/trunk/lib/Mvm/CommonThread/Makefile.am
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommonThread/Makefile.am?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/CommonThread/Makefile.am (original)
+++ vmkit/trunk/lib/Mvm/CommonThread/Makefile.am (removed)
@@ -1,6 +0,0 @@
-noinst_LIBRARIES = libuvm_common_thread.a
-
-libuvm_common_thread_a_SOURCES = cterror.h ctthread.cpp cterror.cpp ctlock.cpp
-libuvm_common_thread_a_CXXFLAGS = -frepo -O2 -W -Wall -Werror -ansi -pedantic -Wno-unused-parameter
-
-CLEANFILES = *~ *.bak .*.sw?
Removed: vmkit/trunk/lib/Mvm/CommonThread/main.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommonThread/main.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/CommonThread/main.cpp (original)
+++ vmkit/trunk/lib/Mvm/CommonThread/main.cpp (removed)
@@ -1,94 +0,0 @@
-//===----------------- main.cc - Mvm common threads -----------------------===//
-//
-// Mvm
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "ctthread.h"
-#include <stdio.h>
-#include <sys/time.h>
-
-LockReccursive * l;
-Cond * c;
-int go=0;
-
-extern "C" int getchar(void);
-
-int f(void *arg) {
- struct timeval tv;
- tv.tv_sec = 2;
- tv.tv_usec = 0;
- l->lock();
- while(!go) {
- printf("Wait %d\n", Thread::self());
- c->timed_wait(l, &tv);
- }
- l->unlock();
- printf("Salut\n");
- return 0;
-}
-
-void pre(void *a) {
- printf("Pré %p\n", a);
-}
-
-void post(void *a) {
- printf("Post %p\n", a);
-}
-
-class Zop {
-public:
- static Key<Zop> * k;
- static void initialise_Key(void *pk) {
- printf("Init %p %p\n", pk, &k);
- ((Key<Zop>*)pk)->set(new Zop());
- printf("GOOD\n");
- }
-
- static void duplicate_for_thread(void *, void *z) {
- printf("Dup %p\n", z);
- k->set(new Zop());
- }
-
- static void destroy_Key(void *z) {
- printf("************ Del %p\n", z);
- delete (Zop *)z;
- }
-};
-
-Key<Zop>* Zop::k;
-
-int main(int argc, char **argv) {
- printf("START\n");
- ctthread_t tid;
-
- printf("Initialise thread...\n");
- Thread::initialise();
- printf("Create Key...\n");
-
- Zop::k = new Key<Zop>();
- l = new LockReccursive();
- c = new Cond();
- printf("OK\n");
-
- Thread::register_handler(pre, post, (void *)0x1000);
- Thread::remove_handler(Thread::register_handler(pre, post, (void *)0x1000));
-
- Thread::start(&tid, f, (void *)22);
- Thread::start(&tid, f, (void *)33);
-
- getchar();
- l->lock();
- go = 1;
- c->broadcast();
- l->unlock();
-
- printf("On est passé\n");
-
- getchar();
- Thread::exit(22);
-}
-
Added: vmkit/trunk/lib/Mvm/GCMmap2/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/GCMmap2/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/GCMmap2/Makefile (added)
+++ vmkit/trunk/lib/Mvm/GCMmap2/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,14 @@
+##===- lib/Mvm/GCMmap2/Makefile ----------------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../../..
+
+LIBRARYNAME = GCMmap2
+include $(LEVEL)/Makefile.common
+
+CXX.Flags += -I../CommonThread -I../Allocator
Removed: vmkit/trunk/lib/Mvm/GCMmap2/Makefile.am
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/GCMmap2/Makefile.am?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/GCMmap2/Makefile.am (original)
+++ vmkit/trunk/lib/Mvm/GCMmap2/Makefile.am (removed)
@@ -1,22 +0,0 @@
-noinst_LIBRARIES = libuvm_gc_mmap2.a
-noinst_PROGRAMS = mainuvm_gc_mmap2
-
-THREADDIR=../CommonThread
-ALLOCDIR=../Allocator
-INCLUDEDIRS=-I at srcdir@/$(THREADDIR) -I at srcdir@/$(ALLOCDIR)
-
-LIBTHREAD=$(THREADDIR)/libuvm_common_thread.a
-LIBALLOC=$(ALLOCDIR)/libuvm_alloc.a
-
-libuvm_gc_mmap2_a_SOURCES = gc.cpp gccollector.cpp gcinit.cpp gccollector.h
-if HAVE_PTHREAD
-libuvm_gc_mmap2_a_SOURCES += gcthread.cpp
-endif
-libuvm_gc_mmap2_a_CXXFLAGS =$(INCLUDEDIRS) -O2 -W -Wall -ansi -pedantic -Wno-unused-parameter -Wno-variadic-macros
-
-mainuvm_gc_mmap2_SOURCES = main.cpp
-mainuvm_gc_mmap2_CXXFLAGS = -O2
-mainuvm_gc_mmap2_LDADD = libuvm_gc_mmap2.a $(LIBTHREAD) $(LIBALLOC)
-mainuvm_gc_mmap2_LDFLAGS =
-
-CLEANFILES = *~ *.bak .*.sw?
Modified: vmkit/trunk/lib/Mvm/GCMmap2/gccollector.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/GCMmap2/gccollector.h?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/GCMmap2/gccollector.h (original)
+++ vmkit/trunk/lib/Mvm/GCMmap2/gccollector.h Wed Jun 25 04:59:39 2008
@@ -10,7 +10,7 @@
#ifndef _GC_COLLECTOR_H_
#define _GC_COLLECTOR_H_
-#include "config.h"
+#include "mvm/Config/config.h"
#include "gcalloc.h"
#ifdef HAVE_PTHREAD
#include "gcthread.h"
Removed: vmkit/trunk/lib/Mvm/GCMmap2/main.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/GCMmap2/main.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/GCMmap2/main.cpp (original)
+++ vmkit/trunk/lib/Mvm/GCMmap2/main.cpp (removed)
@@ -1,43 +0,0 @@
-//===---------------- main.cc - Mvm Garbage Collector ---------------------===//
-//
-// Mvm
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "mvm/GC/GC.h"
-#include "mvm/Threads/Thread.h"
-#include <stdio.h>
-
-mvm::Key<mvm::Thread>* mvm::Thread::threadKey = 0;
-
-void destr(gc *me, size_t sz) {
- printf("Destroy %p\n", me);
-}
-
-void trace(gc *me, size_t sz) {
- // printf("Trace %p\n", me);
-}
-
-void marker(void*) {
- // printf("Marker...\n");
-}
-
-int main(int argc, char **argv) {
- mvm::Thread::initialise();
- Collector::initialise(marker, 0);
-#ifdef MULTIPLE_GC
- mvm::Thread::get()->GC->destroy();
-#else
- Collector::destroy();
-#endif
- return 0;
-}
-
-
-
-
-
-
Removed: vmkit/trunk/lib/Mvm/Main.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Main.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/Main.cpp (original)
+++ vmkit/trunk/lib/Mvm/Main.cpp (removed)
@@ -1,58 +0,0 @@
-//===--------------- Main.cc - Execution of the mvm -----------------------===//
-//
-// The Micro Virtual Machine
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "MvmGC.h"
-#include "mvm/JIT.h"
-#include "mvm/PrintBuffer.h"
-#include "mvm/Threads/Thread.h"
-
-
-#include <dlfcn.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <stdio.h>
-
-#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/ManagedStatic.h"
-
-#include "CommandLine.h"
-
-using namespace mvm;
-
-
-typedef int (*boot)(int, char**, char**);
-
-static void clearSignals(void) {
- signal(SIGINT, SIG_DFL);
- signal(SIGILL, SIG_DFL);
-#if !defined(WIN32)
- signal(SIGIOT, SIG_DFL);
- signal(SIGBUS, SIG_DFL);
-#endif
- signal(SIGSEGV, SIG_DFL);
-}
-
-int main(int argc, char **argv, char **envp) {
- llvm::llvm_shutdown_obj X;
- int base;
- llvm::cl::ParseCommandLineOptions(argc, argv,
- " VMKit: a virtual machine launcher\n");
- jit::initialise();
- Object::initialise();
- Thread::initialise();
- Collector::initialise(0, &base);
-
- CommandLine cl;
- cl.start();
-
- clearSignals();
- Thread::exit(0);
-
- return 0;
-}
Added: vmkit/trunk/lib/Mvm/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/Makefile (added)
+++ vmkit/trunk/lib/Mvm/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,15 @@
+##===- lib/Mvm/Makefile ------------------------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../..
+
+PARALLEL_DIRS = Allocator BoehmGC CommonThread GCMmap2
+
+LIBRARYNAME = Mvm
+include $(LEVEL)/Makefile.common
+
Removed: vmkit/trunk/lib/Mvm/Makefile.am
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Makefile.am?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/Makefile.am (original)
+++ vmkit/trunk/lib/Mvm/Makefile.am (removed)
@@ -1,11 +0,0 @@
-SUBDIRS = CommonThread Allocator GCMmap2 BoehmGC
-DIST_SUBDIRS = CommonThread Allocator GCMmap2 BoehmGC
-
-bin_PROGRAMS = main
-
-PREFIX=@prefix@
-
-main_SOURCES = Main.cpp Object.cpp Sigsegv.cpp JIT.cpp CommandLine.cpp CommandLine.h MvmMemoryManager.h MvmMemoryManager.cpp EscapeAnalysis.cpp Disassembler.cpp
-main_CXXFLAGS = -DPREFIX=\"$(PREFIX)\" -W -Wall -ansi -Wno-unused-parameter -pedantic -Wno-long-long -fno-omit-frame-pointer -O2 -g
-main_LDFLAGS=@rdynamic@
-main_LDADD = @LLVMDYLIB@ @GC_LIBS@ @GCTHREAD_LIBS@
Removed: vmkit/trunk/lib/Mvm/VTOffset.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/VTOffset.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/VTOffset.cpp (original)
+++ vmkit/trunk/lib/Mvm/VTOffset.cpp (removed)
@@ -1,97 +0,0 @@
-//===-- VTOffset.cpp - Calculates compiler dependant VT offsets -----------===//
-//
-// The Micro Virtual Machine
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <dlfcn.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <stdio.h>
-
-#include "MvmGC.h"
-#include "mvm/PrintBuffer.h"
-#include "mvm/Threads/Thread.h"
-#include "mvm/Sigsegv.h"
-
-class Toto : public mvm::Object {
-public:
-
- static VirtualTable* VT;
- virtual void print(mvm::PrintBuffer* buf) const {
- printf("in print!\n");
- }
- virtual int hashCode() {
- printf("in hashcode!\n");
- return 1;
- }
-
- virtual void tracer(size_t sz) {
- printf("in tracer\n");
- }
-
- virtual void destroyer(size_t sz) {
- printf("in destroy!\n");
- }
-
- ~Toto() {
- printf("in delete Toto!\n");
- }
-};
-
-class Tata : public Toto {
- public:
- static VirtualTable* VT;
- ~Tata() {
- printf("in delete Tata!\n");
- }
-};
-
-VirtualTable* Toto::VT = 0;
-typedef void (*toto_t)(Toto* t);
-
-VirtualTable* Tata::VT = 0;
-typedef void (*tata_t)(Tata* t);
-
-int main(int argc, char **argv, char **envp) {
- int base;
-
- mvm::Object::initialise();
-
- /*void* handle = sys_dlopen("libLisp.so", RTLD_LAZY | RTLD_GLOBAL);
- boot func = (boot)sys_dlsym(handle, "boot");
- func(argc, argv, envp);*/
- {
- Toto t;
- Toto::VT =((void**)(void*)&t)[0];
- toto_t* ptr = (toto_t*)Toto::VT;
- printf("ptr[0] = %d, ptr[1]= %d, ptr[2] = %d ptr[3] = %d ptr[4] = %d ptr[5] = %d\n", ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5]);
- ptr[0](&t);
- //ptr[1](&t); // This should be ~gc
- ptr[2](&t);
- ptr[3](&t);
- ptr[4](&t);
- ptr[5](&t);
-}
-{
- Tata t;
- Tata::VT =((void**)(void*)&t)[0];
- tata_t* ptr = (tata_t*)Tata::VT;
- printf("ptr[0] = %d, ptr[1]= %d, ptr[2] = %d ptr[3] = %d ptr[4] = %d ptr[5] = %d\n", ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5]);
- printf("Call des\n");
- ptr[0](&t);
- printf("End\n");
- //ptr[1](&t); // This should be ~gc
- ptr[2](&t);
- ptr[3](&t);
- ptr[4](&t);
- ptr[5](&t);
-}
-Tata* t = gc_new(Tata)();
- mvm::Thread::exit(0);
-
- return 0;
-}
Removed: vmkit/trunk/lib/N3/Main.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/Main.cpp?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/N3/Main.cpp (original)
+++ vmkit/trunk/lib/N3/Main.cpp (removed)
@@ -1,36 +0,0 @@
-//===------------ Main.cpp - Simple execution of N3 -----------------------===//
-//
-// N3
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "MvmGC.h"
-#include "mvm/JIT.h"
-#include "mvm/PrintBuffer.h"
-#include "mvm/Threads/Thread.h"
-
-#include "llvm/Support/ManagedStatic.h"
-
-using namespace mvm;
-
-
-extern "C" int boot();
-extern "C" int start_app(int, char**);
-
-
-int main(int argc, char **argv, char **envp) {
- llvm::llvm_shutdown_obj X;
- int base;
-
- Thread::initialise();
- jit::initialise();
- Object::initialise();
- Collector::initialise(0, &base);
- boot();
- start_app(argc, argv);
-
- return 0;
-}
Added: vmkit/trunk/lib/N3/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/N3/Makefile (added)
+++ vmkit/trunk/lib/N3/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,13 @@
+##===- lib/Makefile ----------------------------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../..
+
+DIRS = VMCore
+
+include $(LEVEL)/Makefile.common
Removed: vmkit/trunk/lib/N3/Makefile.am
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/Makefile.am?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/N3/Makefile.am (original)
+++ vmkit/trunk/lib/N3/Makefile.am (removed)
@@ -1,11 +0,0 @@
-SUBDIRS = VMCore
-bin_PROGRAMS = main
-
-PREFIX=@prefix@
-
-main_SOURCES = ../Mvm/Object.cpp ../Mvm/Sigsegv.cpp Main.cpp ../Mvm/MvmMemoryManager.cpp ../Mvm/JIT.cpp ../Mvm/EscapeAnalysis.cpp
-
-main_CXXFLAGS = -DPREFIX=\"$(PREFIX)\" -W -Wall -ansi -Wno-unused-parameter -Wno-long-long -Wno-unused-function -fno-omit-frame-pointer -g -Werror -O2
-main_LDADD = VMCore/.libs/libN3.a @GC_LIBS@ @GCTHREAD_LIBS@ @LLVMDYLIB@ @pnetlocalprefix@/engine/libILEngine.a @pnetlocalprefix@/image/libILImage.a @pnetlocalprefix@/support/libILSupport.a \
- @pnetlocalprefix@/libffi/.libs/libffi.a @pnetlocalprefix@/dumpasm/libILDumpAsm.a
-main_LDFLAGS = @rdynamic@
Removed: vmkit/trunk/lib/N3/README
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/README?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/N3/README (original)
+++ vmkit/trunk/lib/N3/README (removed)
@@ -1,12 +0,0 @@
-1 - Install pnetlib-0.8.0
-
-2 - Download pnet 0.8.0
- tar zxvf pnet-0.8.0.tar.gz
- ./configure
- make
-
-3 - Compile n3
-
-4 - Run
- export MSCORLIB={directory of pnetlib's mscorlib.dll}
- ./run-n3 HelloWorld.exe
Added: vmkit/trunk/lib/N3/README.txt
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/README.txt?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/N3/README.txt (added)
+++ vmkit/trunk/lib/N3/README.txt Wed Jun 25 04:59:39 2008
@@ -0,0 +1,12 @@
+1 - Install pnetlib-0.8.0
+
+2 - Download pnet 0.8.0
+ tar zxvf pnet-0.8.0.tar.gz
+ ./configure
+ make
+
+3 - Compile n3
+
+4 - Run
+ export MSCORLIB={directory of pnetlib's mscorlib.dll}
+ n3 HelloWorld.exe
Modified: vmkit/trunk/lib/N3/VMCore/Assembly.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/Assembly.cpp?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/Assembly.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/Assembly.cpp Wed Jun 25 04:59:39 2008
@@ -25,6 +25,197 @@
using namespace n3;
+
+#define DEF_TABLE_MASK(name, nb, ...) \
+ static void name(uint32 index, \
+ std::vector<Table*, gc_allocator<Table*> >& tables, \
+ uint32 heapSizes) { \
+ Table* table = tables[index]; \
+ uint32 rowSize = 0; \
+ uint32 bitmask = 0; \
+ __VA_ARGS__; \
+ table->count = nb; \
+ table->sizeMask = bitmask; \
+ table->rowSize = rowSize; \
+ }
+
+
+DEF_TABLE_MASK(METHOD_Module, 5,
+ INT16(CONSTANT_MODULE_GENERATION)
+ STRING(CONSTANT_MODULE_NAME)
+ GUID(CONSTANT_MODULE_MVID)
+ GUID(CONSTANT_MODULE_ENCID)
+ GUID(CONSTANT_MODULE_ENCBASEID))
+
+DEF_TABLE_MASK(METHOD_TypeRef, 3,
+ RESOLUTION_SCOPE(CONSTANT_TYPEREF_RESOLUTION_SCOPE)
+ STRING(CONSTANT_TYPEREF_NAME)
+ STRING(CONSTANT_TYPEREF_NAMESPACE))
+
+DEF_TABLE_MASK(METHOD_TypeDef, 6,
+ INT32(CONSTANT_TYPEDEF_FLAGS)
+ STRING(CONSTANT_TYPEDEF_NAME)
+ STRING(CONSTANT_TYPEDEF_NAMESPACE)
+ TYPEDEF_OR_REF(CONSTANT_TYPEDEF_EXTENDS)
+ TABLE(CONSTANT_Field, CONSTANT_TYPEDEF_FIELDLIST)
+ TABLE(CONSTANT_MethodDef, CONSTANT_TYPEDEF_METHODLIST))
+
+DEF_TABLE_MASK(METHOD_MethodDef, 6,
+ INT32(CONSTANT_METHODDEF_RVA)
+ INT16(CONSTANT_METHODDEF_IMPLFLAGS)
+ INT16(CONSTANT_METHODDEF_FLAGS)
+ STRING(CONSTANT_METHODDEF_NAME)
+ BLOB(CONSTANT_METHODDEF_SIGNATURE)
+ TABLE(CONSTANT_Param, CONSTANT_METHODDEF_PARAMLIST))
+
+DEF_TABLE_MASK(METHOD_Param, 3,
+ INT16(CONSTANT_PARAM_FLAGS)
+ INT16(CONSTANT_PARAM_SEQUENCE)
+ STRING(CONSTANT_PARAM_NAME))
+
+DEF_TABLE_MASK(METHOD_MemberRef, 3,
+ MEMBER_REF_PARENT(CONSTANT_MEMBERREF_CLASS)
+ STRING(CONSTANT_MEMBERREF_NAME)
+ BLOB(CONSTANT_MEMBERREF_SIGNATURE))
+
+DEF_TABLE_MASK(METHOD_CustomAttribute, 3,
+ HAS_CUSTOM_ATTRIBUTE(CONSTANT_CUSTOM_ATTRIBUTE_PARENT)
+ CUSTOM_ATTRIBUTE_TYPE(CONSTANT_CUSTOM_ATTRIBUTE_TYPE)
+ BLOB(CONSTANT_CUSTOM_ATTRIBUTE_VALUE))
+
+DEF_TABLE_MASK(METHOD_StandaloneSig, 1,
+ BLOB(CONSTANT_STANDALONE_SIG_SIGNATURE))
+
+DEF_TABLE_MASK(METHOD_TypeSpec, 1,
+ BLOB(CONSTANT_TYPESPEC_SIGNATURE))
+
+DEF_TABLE_MASK(METHOD_Assembly, 9,
+ INT32(CONSTANT_ASSEMBLY_HASH_ALG_ID)
+ INT16(CONSTANT_ASSEMBLY_MAJOR)
+ INT16(CONSTANT_ASSEMBLY_MINOR)
+ INT16(CONSTANT_ASSEMBLY_BUILD)
+ INT16(CONSTANT_ASSEMBLY_REVISION)
+ INT32(CONSTANT_ASSEMBLY_FLAGS)
+ BLOB(CONSTANT_ASSEMBLY_PUBLIC_KEY)
+ STRING(CONSTANT_ASSEMBLY_NAME)
+ STRING(CONSTANT_ASSEMBLY_CULTURE))
+
+DEF_TABLE_MASK(METHOD_AssemblyRef, 9,
+ INT16(CONSTANT_ASSEMBLY_REF_MAJOR)
+ INT16(CONSTANT_ASSEMBLY_REF_MINOR)
+ INT16(CONSTANT_ASSEMBLY_REF_BUILD)
+ INT16(CONSTANT_ASSEMBLY_REF_REVISION)
+ INT32(CONSTANT_ASSEMBLY_REF_FLAGS)
+ BLOB(CONSTANT_ASSEMBLY_REF_PUBLIC_KEY)
+ STRING(CONSTANT_ASSEMBLY_REF_NAME)
+ STRING(CONSTANT_ASSEMBLY_REF_CULTURE)
+ BLOB(CONSTANT_ASSEMBLY_REF_HASH_VALUE))
+
+DEF_TABLE_MASK(METHOD_Field, 3,
+ INT16(CONSTANT_FIELD_FLAGS)
+ STRING(CONSTANT_FIELD_NAME)
+ BLOB(CONSTANT_FIELD_SIGNATURE))
+
+DEF_TABLE_MASK(METHOD_InterfaceImpl, 2,
+ TABLE(CONSTANT_TypeDef, CONSTANT_INTERFACE_IMPL_CLASS)
+ TYPEDEF_OR_REF(CONSTANT_INTERFACE_IMPL_INTERFACE))
+
+DEF_TABLE_MASK(METHOD_NestedClass, 2,
+ TABLE(CONSTANT_TypeDef, CONSTANT_NESTED_CLASS_NESTED_CLASS)
+ TABLE(CONSTANT_TypeDef, CONSTANT_NESTED_CLASS_ENCLOSING_CLASS))
+
+DEF_TABLE_MASK(METHOD_MethodSpec, 2,
+ METHODDEF_OR_REF(CONSTANT_METHOD_SPEC_METHOD)
+ BLOB(CONSTANT_METHOD_SPEC_INSTANTIATION))
+
+DEF_TABLE_MASK(METHOD_GenericParamConstraint, 2,
+ TABLE(CONSTANT_GenericParam, CONSTANT_GENERIC_PARAM_CONSTRAINT_OWNER)
+ TYPEDEF_OR_REF(CONSTANT_GENERIC_PARAM_CONSTRAINT_CONSTRAINT))
+
+DEF_TABLE_MASK(METHOD_Constant, 3,
+ INT16(CONSTANT_CONSTANT_TYPE)
+ HAS_CONSTANT(CONSTANT_CONSTANT_PARENT)
+ BLOB(CONSTANT_CONSTANT_VALUE))
+
+DEF_TABLE_MASK(METHOD_FieldMarshal, 2,
+ HAS_FIELD_MARSHAL(CONSTANT_FIELD_MARSHAL_PARENT)
+ BLOB(CONSTANT_FIELD_MARSHAL_NATIVE_TYPE))
+
+DEF_TABLE_MASK(METHOD_DeclSecurity, 3,
+ INT16(CONSTANT_DECL_SECURITY_ACTION)
+ HAS_DECL_SECURITY(CONSTANT_DECL_SECURITY_PARENT)
+ BLOB(CONSTANT_DECL_SECURITY_PERMISSION_SET))
+
+DEF_TABLE_MASK(METHOD_ClassLayout, 3,
+ INT16(CONSTANT_CLASS_LAYOUT_PACKING_SIZE)
+ INT32(CONSTANT_CLASS_LAYOUT_CLASS_SIZE)
+ TABLE(CONSTANT_TypeDef, CONSTANT_CLASS_LAYOUT_PARENT))
+
+DEF_TABLE_MASK(METHOD_FieldLayout, 2,
+ INT32(CONSTANT_FIELD_LAYOUT_OFFSET)
+ TABLE(CONSTANT_Field, CONSTANT_FIELD_LAYOUT_FIELD))
+
+DEF_TABLE_MASK(METHOD_EventMap, 2,
+ TABLE(CONSTANT_TypeDef, CONSTANT_EVENT_MAP_PARENT)
+ TABLE(CONSTANT_Event, CONSTANT_EVEN_MAP_EVENT_LIST))
+
+DEF_TABLE_MASK(METHOD_Event, 3,
+ INT16(CONSTANT_EVENT_EVENT_FLAGS)
+ STRING(CONSTANT_EVENT_NAME)
+ TYPEDEF_OR_REF(CONSTANT_EVENT_TYPE))
+
+DEF_TABLE_MASK(METHOD_PropertyMap, 2,
+ TABLE(CONSTANT_TypeDef, CONSTANT_PROPERTY_MAP_PARENT)
+ TABLE(CONSTANT_Property, CONSTANT_PROPERTY_MAP_PROPERTY_LIST))
+
+DEF_TABLE_MASK(METHOD_Property, 3,
+ INT16(CONSTANT_PROPERTY_FLAGS)
+ STRING(CONSTANT_PROPERTY_NAME)
+ BLOB(CONSTANT_PROPERTY_TYPE))
+
+DEF_TABLE_MASK(METHOD_MethodSemantics, 3,
+ INT16(CONSTANT_METHOD_SEMANTICS_SEMANTICS)
+ TABLE(CONSTANT_MethodDef, CONSTANT_METHOD_SEMANTICS_METHOD)
+ HAS_SEMANTICS(CONSTANT_METHOD_SEMANTICS_ASSOCIATION))
+
+DEF_TABLE_MASK(METHOD_MethodImpl, 3,
+ TABLE(CONSTANT_TypeDef, CONSTANT_METHOD_IMPL_CLASS)
+ METHODDEF_OR_REF(CONSTANT_METHOD_IMPL_METHOD_BODY)
+ METHODDEF_OR_REF(CONSTANT_METHOD_IMPL_METHOD_DECLARATION))
+
+DEF_TABLE_MASK(METHOD_ModuleRef, 1,
+ STRING(CONSTANT_MODULE_REF_NAME))
+
+DEF_TABLE_MASK(METHOD_ImplMap, 4,
+ INT16(CONSTANT_IMPL_MAP_MAPPING_FLAGS)
+ MEMBER_FORWARDED(CONSTANT_IMPL_MAP_MEMBER_FORWARDED)
+ STRING(CONSTANT_IMPL_MAP_IMPORT_NAME)
+ TABLE(CONSTANT_ModuleRef, CONSTANT_IMPL_MAP_IMPORT_SCOPE))
+
+DEF_TABLE_MASK(METHOD_FieldRva, 2,
+ INT32(CONSTANT_FIELD_RVA_RVA)
+ TABLE(CONSTANT_Field, CONSTANT_FIELD_RVA_FIELD))
+
+DEF_TABLE_MASK(METHOD_ManifestResource, 4,
+ INT32(CONSTANT_MANIFEST_RESOURCE_OFFSET)
+ INT32(CONSTANT_MANIFEST_RESOURCE_FLAGS)
+ STRING(CONSTANT_MANIFEST_RESOURCE_NAME)
+ IMPLEMENTATION(CONSTANT_MANIFEST_RESOURCE_IMPLEMENTATION))
+
+DEF_TABLE_MASK(METHOD_AssemblyProcessor, 1,
+ INT32(CONSTANT_ASSEMBLY_PROCESSOR_PROCESSOR))
+
+DEF_TABLE_MASK(METHOD_AssemblyOS, 3,
+ INT32(CONSTANT_ASSEMBLY_OS_PLATFORM_ID)
+ INT32(CONSTANT_ASSEMBLY_OS_MAJOR_VERSION)
+ INT32(CONSTANT_ASSEMBLY_OS_MINOR_VERSION))
+
+DEF_TABLE_MASK(METHOD_File, 3,
+ INT32(CONSTANT_FILE_FLAGS)
+ STRING(CONSTANT_FILE_NAME)
+ BLOB(CONSTANT_FILE_HASH_VALUE))
+
+
void Header::print(mvm::PrintBuffer* buf) const {
buf->write("Header<>");
}
Modified: vmkit/trunk/lib/N3/VMCore/Assembly.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/Assembly.h?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/Assembly.h (original)
+++ vmkit/trunk/lib/N3/VMCore/Assembly.h Wed Jun 25 04:59:39 2008
@@ -562,19 +562,6 @@
}
-#define DEF_TABLE_MASK(name, nb, ...) \
- static void name(uint32 index, \
- std::vector<Table*, gc_allocator<Table*> >& tables, \
- uint32 heapSizes) { \
- Table* table = tables[index]; \
- uint32 rowSize = 0; \
- uint32 bitmask = 0; \
- __VA_ARGS__; \
- table->count = nb; \
- table->sizeMask = bitmask; \
- table->rowSize = rowSize; \
- }
-
#define CONSTANT_MODULE_GENERATION 0
#define CONSTANT_MODULE_NAME 1
#define CONSTANT_MODULE_MVID 2
@@ -582,22 +569,10 @@
#define CONSTANT_MODULE_ENCBASEID 4
-DEF_TABLE_MASK(METHOD_Module, 5,
- INT16(CONSTANT_MODULE_GENERATION)
- STRING(CONSTANT_MODULE_NAME)
- GUID(CONSTANT_MODULE_MVID)
- GUID(CONSTANT_MODULE_ENCID)
- GUID(CONSTANT_MODULE_ENCBASEID))
-
#define CONSTANT_TYPEREF_RESOLUTION_SCOPE 0
#define CONSTANT_TYPEREF_NAME 1
#define CONSTANT_TYPEREF_NAMESPACE 2
-DEF_TABLE_MASK(METHOD_TypeRef, 3,
- RESOLUTION_SCOPE(CONSTANT_TYPEREF_RESOLUTION_SCOPE)
- STRING(CONSTANT_TYPEREF_NAME)
- STRING(CONSTANT_TYPEREF_NAMESPACE))
-
#define CONSTANT_TYPEDEF_FLAGS 0
#define CONSTANT_TYPEDEF_NAME 1
#define CONSTANT_TYPEDEF_NAMESPACE 2
@@ -605,14 +580,6 @@
#define CONSTANT_TYPEDEF_FIELDLIST 4
#define CONSTANT_TYPEDEF_METHODLIST 5
-DEF_TABLE_MASK(METHOD_TypeDef, 6,
- INT32(CONSTANT_TYPEDEF_FLAGS)
- STRING(CONSTANT_TYPEDEF_NAME)
- STRING(CONSTANT_TYPEDEF_NAMESPACE)
- TYPEDEF_OR_REF(CONSTANT_TYPEDEF_EXTENDS)
- TABLE(CONSTANT_Field, CONSTANT_TYPEDEF_FIELDLIST)
- TABLE(CONSTANT_MethodDef, CONSTANT_TYPEDEF_METHODLIST))
-
#define CONSTANT_METHODDEF_RVA 0
#define CONSTANT_METHODDEF_IMPLFLAGS 1
#define CONSTANT_METHODDEF_FLAGS 2
@@ -620,51 +587,22 @@
#define CONSTANT_METHODDEF_SIGNATURE 4
#define CONSTANT_METHODDEF_PARAMLIST 5
-DEF_TABLE_MASK(METHOD_MethodDef, 6,
- INT32(CONSTANT_METHODDEF_RVA)
- INT16(CONSTANT_METHODDEF_IMPLFLAGS)
- INT16(CONSTANT_METHODDEF_FLAGS)
- STRING(CONSTANT_METHODDEF_NAME)
- BLOB(CONSTANT_METHODDEF_SIGNATURE)
- TABLE(CONSTANT_Param, CONSTANT_METHODDEF_PARAMLIST))
-
#define CONSTANT_PARAM_FLAGS 0
#define CONSTANT_PARAM_SEQUENCE 1
#define CONSTANT_PARAM_NAME 2
-DEF_TABLE_MASK(METHOD_Param, 3,
- INT16(CONSTANT_PARAM_FLAGS)
- INT16(CONSTANT_PARAM_SEQUENCE)
- STRING(CONSTANT_PARAM_NAME))
-
#define CONSTANT_MEMBERREF_CLASS 0
#define CONSTANT_MEMBERREF_NAME 1
#define CONSTANT_MEMBERREF_SIGNATURE 2
-DEF_TABLE_MASK(METHOD_MemberRef, 3,
- MEMBER_REF_PARENT(CONSTANT_MEMBERREF_CLASS)
- STRING(CONSTANT_MEMBERREF_NAME)
- BLOB(CONSTANT_MEMBERREF_SIGNATURE))
-
#define CONSTANT_CUSTOM_ATTRIBUTE_PARENT 0
#define CONSTANT_CUSTOM_ATTRIBUTE_TYPE 1
#define CONSTANT_CUSTOM_ATTRIBUTE_VALUE 2
-DEF_TABLE_MASK(METHOD_CustomAttribute, 3,
- HAS_CUSTOM_ATTRIBUTE(CONSTANT_CUSTOM_ATTRIBUTE_PARENT)
- CUSTOM_ATTRIBUTE_TYPE(CONSTANT_CUSTOM_ATTRIBUTE_TYPE)
- BLOB(CONSTANT_CUSTOM_ATTRIBUTE_VALUE))
-
#define CONSTANT_STANDALONE_SIG_SIGNATURE 0
-DEF_TABLE_MASK(METHOD_StandaloneSig, 1,
- BLOB(CONSTANT_STANDALONE_SIG_SIGNATURE))
-
#define CONSTANT_TYPESPEC_SIGNATURE 0
-DEF_TABLE_MASK(METHOD_TypeSpec, 1,
- BLOB(CONSTANT_TYPESPEC_SIGNATURE))
-
#define CONSTANT_ASSEMBLY_HASH_ALG_ID 0
#define CONSTANT_ASSEMBLY_MAJOR 1
#define CONSTANT_ASSEMBLY_MINOR 2
@@ -675,17 +613,6 @@
#define CONSTANT_ASSEMBLY_NAME 7
#define CONSTANT_ASSEMBLY_CULTURE 8
-DEF_TABLE_MASK(METHOD_Assembly, 9,
- INT32(CONSTANT_ASSEMBLY_HASH_ALG_ID)
- INT16(CONSTANT_ASSEMBLY_MAJOR)
- INT16(CONSTANT_ASSEMBLY_MINOR)
- INT16(CONSTANT_ASSEMBLY_BUILD)
- INT16(CONSTANT_ASSEMBLY_REVISION)
- INT32(CONSTANT_ASSEMBLY_FLAGS)
- BLOB(CONSTANT_ASSEMBLY_PUBLIC_KEY)
- STRING(CONSTANT_ASSEMBLY_NAME)
- STRING(CONSTANT_ASSEMBLY_CULTURE))
-
#define CONSTANT_ASSEMBLY_REF_MAJOR 0
#define CONSTANT_ASSEMBLY_REF_MINOR 1
#define CONSTANT_ASSEMBLY_REF_BUILD 2
@@ -696,203 +623,87 @@
#define CONSTANT_ASSEMBLY_REF_CULTURE 7
#define CONSTANT_ASSEMBLY_REF_HASH_VALUE 8
-DEF_TABLE_MASK(METHOD_AssemblyRef, 9,
- INT16(CONSTANT_ASSEMBLY_REF_MAJOR)
- INT16(CONSTANT_ASSEMBLY_REF_MINOR)
- INT16(CONSTANT_ASSEMBLY_REF_BUILD)
- INT16(CONSTANT_ASSEMBLY_REF_REVISION)
- INT32(CONSTANT_ASSEMBLY_REF_FLAGS)
- BLOB(CONSTANT_ASSEMBLY_REF_PUBLIC_KEY)
- STRING(CONSTANT_ASSEMBLY_REF_NAME)
- STRING(CONSTANT_ASSEMBLY_REF_CULTURE)
- BLOB(CONSTANT_ASSEMBLY_REF_HASH_VALUE))
-
#define CONSTANT_FIELD_FLAGS 0
#define CONSTANT_FIELD_NAME 1
#define CONSTANT_FIELD_SIGNATURE 2
-DEF_TABLE_MASK(METHOD_Field, 3,
- INT16(CONSTANT_FIELD_FLAGS)
- STRING(CONSTANT_FIELD_NAME)
- BLOB(CONSTANT_FIELD_SIGNATURE))
-
#define CONSTANT_INTERFACE_IMPL_CLASS 0
#define CONSTANT_INTERFACE_IMPL_INTERFACE 1
-DEF_TABLE_MASK(METHOD_InterfaceImpl, 2,
- TABLE(CONSTANT_TypeDef, CONSTANT_INTERFACE_IMPL_CLASS)
- TYPEDEF_OR_REF(CONSTANT_INTERFACE_IMPL_INTERFACE))
-
#define CONSTANT_NESTED_CLASS_NESTED_CLASS 0
#define CONSTANT_NESTED_CLASS_ENCLOSING_CLASS 1
-DEF_TABLE_MASK(METHOD_NestedClass, 2,
- TABLE(CONSTANT_TypeDef, CONSTANT_NESTED_CLASS_NESTED_CLASS)
- TABLE(CONSTANT_TypeDef, CONSTANT_NESTED_CLASS_ENCLOSING_CLASS))
-
#define CONSTANT_METHOD_SPEC_METHOD 0
#define CONSTANT_METHOD_SPEC_INSTANTIATION 1
-DEF_TABLE_MASK(METHOD_MethodSpec, 2,
- METHODDEF_OR_REF(CONSTANT_METHOD_SPEC_METHOD)
- BLOB(CONSTANT_METHOD_SPEC_INSTANTIATION))
-
#define CONSTANT_GENERIC_PARAM_CONSTRAINT_OWNER 0
#define CONSTANT_GENERIC_PARAM_CONSTRAINT_CONSTRAINT 1
-DEF_TABLE_MASK(METHOD_GenericParamConstraint, 2,
- TABLE(CONSTANT_GenericParam, CONSTANT_GENERIC_PARAM_CONSTRAINT_OWNER)
- TYPEDEF_OR_REF(CONSTANT_GENERIC_PARAM_CONSTRAINT_CONSTRAINT))
-
#define CONSTANT_CONSTANT_TYPE 0
#define CONSTANT_CONSTANT_PARENT 1
#define CONSTANT_CONSTANT_VALUE 2
-DEF_TABLE_MASK(METHOD_Constant, 3,
- INT16(CONSTANT_CONSTANT_TYPE)
- HAS_CONSTANT(CONSTANT_CONSTANT_PARENT)
- BLOB(CONSTANT_CONSTANT_VALUE))
-
#define CONSTANT_FIELD_MARSHAL_PARENT 0
#define CONSTANT_FIELD_MARSHAL_NATIVE_TYPE 1
-DEF_TABLE_MASK(METHOD_FieldMarshal, 2,
- HAS_FIELD_MARSHAL(CONSTANT_FIELD_MARSHAL_PARENT)
- BLOB(CONSTANT_FIELD_MARSHAL_NATIVE_TYPE))
-
#define CONSTANT_DECL_SECURITY_ACTION 0
#define CONSTANT_DECL_SECURITY_PARENT 1
#define CONSTANT_DECL_SECURITY_PERMISSION_SET 2
-DEF_TABLE_MASK(METHOD_DeclSecurity, 3,
- INT16(CONSTANT_DECL_SECURITY_ACTION)
- HAS_DECL_SECURITY(CONSTANT_DECL_SECURITY_PARENT)
- BLOB(CONSTANT_DECL_SECURITY_PERMISSION_SET))
-
#define CONSTANT_CLASS_LAYOUT_PACKING_SIZE 0
#define CONSTANT_CLASS_LAYOUT_CLASS_SIZE 1
#define CONSTANT_CLASS_LAYOUT_PARENT 2
-DEF_TABLE_MASK(METHOD_ClassLayout, 3,
- INT16(CONSTANT_CLASS_LAYOUT_PACKING_SIZE)
- INT32(CONSTANT_CLASS_LAYOUT_CLASS_SIZE)
- TABLE(CONSTANT_TypeDef, CONSTANT_CLASS_LAYOUT_PARENT))
-
#define CONSTANT_FIELD_LAYOUT_OFFSET 0
#define CONSTANT_FIELD_LAYOUT_FIELD 1
-DEF_TABLE_MASK(METHOD_FieldLayout, 2,
- INT32(CONSTANT_FIELD_LAYOUT_OFFSET)
- TABLE(CONSTANT_Field, CONSTANT_FIELD_LAYOUT_FIELD))
-
#define CONSTANT_EVENT_MAP_PARENT 0
#define CONSTANT_EVEN_MAP_EVENT_LIST 1
-DEF_TABLE_MASK(METHOD_EventMap, 2,
- TABLE(CONSTANT_TypeDef, CONSTANT_EVENT_MAP_PARENT)
- TABLE(CONSTANT_Event, CONSTANT_EVEN_MAP_EVENT_LIST))
-
#define CONSTANT_EVENT_EVENT_FLAGS 0
#define CONSTANT_EVENT_NAME 1
#define CONSTANT_EVENT_TYPE 2
-DEF_TABLE_MASK(METHOD_Event, 3,
- INT16(CONSTANT_EVENT_EVENT_FLAGS)
- STRING(CONSTANT_EVENT_NAME)
- TYPEDEF_OR_REF(CONSTANT_EVENT_TYPE))
-
#define CONSTANT_PROPERTY_MAP_PARENT 0
#define CONSTANT_PROPERTY_MAP_PROPERTY_LIST 1
-DEF_TABLE_MASK(METHOD_PropertyMap, 2,
- TABLE(CONSTANT_TypeDef, CONSTANT_PROPERTY_MAP_PARENT)
- TABLE(CONSTANT_Property, CONSTANT_PROPERTY_MAP_PROPERTY_LIST))
-
#define CONSTANT_PROPERTY_FLAGS 0
#define CONSTANT_PROPERTY_NAME 1
#define CONSTANT_PROPERTY_TYPE 2
-DEF_TABLE_MASK(METHOD_Property, 3,
- INT16(CONSTANT_PROPERTY_FLAGS)
- STRING(CONSTANT_PROPERTY_NAME)
- BLOB(CONSTANT_PROPERTY_TYPE))
-
#define CONSTANT_METHOD_SEMANTICS_SEMANTICS 0
#define CONSTANT_METHOD_SEMANTICS_METHOD 1
#define CONSTANT_METHOD_SEMANTICS_ASSOCIATION 2
-DEF_TABLE_MASK(METHOD_MethodSemantics, 3,
- INT16(CONSTANT_METHOD_SEMANTICS_SEMANTICS)
- TABLE(CONSTANT_MethodDef, CONSTANT_METHOD_SEMANTICS_METHOD)
- HAS_SEMANTICS(CONSTANT_METHOD_SEMANTICS_ASSOCIATION))
-
#define CONSTANT_METHOD_IMPL_CLASS 0
#define CONSTANT_METHOD_IMPL_METHOD_BODY 1
#define CONSTANT_METHOD_IMPL_METHOD_DECLARATION 2
-DEF_TABLE_MASK(METHOD_MethodImpl, 3,
- TABLE(CONSTANT_TypeDef, CONSTANT_METHOD_IMPL_CLASS)
- METHODDEF_OR_REF(CONSTANT_METHOD_IMPL_METHOD_BODY)
- METHODDEF_OR_REF(CONSTANT_METHOD_IMPL_METHOD_DECLARATION))
-
#define CONSTANT_MODULE_REF_NAME 0
-DEF_TABLE_MASK(METHOD_ModuleRef, 1,
- STRING(CONSTANT_MODULE_REF_NAME))
-
#define CONSTANT_IMPL_MAP_MAPPING_FLAGS 0
#define CONSTANT_IMPL_MAP_MEMBER_FORWARDED 1
#define CONSTANT_IMPL_MAP_IMPORT_NAME 2
#define CONSTANT_IMPL_MAP_IMPORT_SCOPE 3
-DEF_TABLE_MASK(METHOD_ImplMap, 4,
- INT16(CONSTANT_IMPL_MAP_MAPPING_FLAGS)
- MEMBER_FORWARDED(CONSTANT_IMPL_MAP_MEMBER_FORWARDED)
- STRING(CONSTANT_IMPL_MAP_IMPORT_NAME)
- TABLE(CONSTANT_ModuleRef, CONSTANT_IMPL_MAP_IMPORT_SCOPE))
-
#define CONSTANT_FIELD_RVA_RVA 0
#define CONSTANT_FIELD_RVA_FIELD 1
-DEF_TABLE_MASK(METHOD_FieldRva, 2,
- INT32(CONSTANT_FIELD_RVA_RVA)
- TABLE(CONSTANT_Field, CONSTANT_FIELD_RVA_FIELD))
-
#define CONSTANT_MANIFEST_RESOURCE_OFFSET 0
#define CONSTANT_MANIFEST_RESOURCE_FLAGS 1
#define CONSTANT_MANIFEST_RESOURCE_NAME 2
#define CONSTANT_MANIFEST_RESOURCE_IMPLEMENTATION 3
-DEF_TABLE_MASK(METHOD_ManifestResource, 4,
- INT32(CONSTANT_MANIFEST_RESOURCE_OFFSET)
- INT32(CONSTANT_MANIFEST_RESOURCE_FLAGS)
- STRING(CONSTANT_MANIFEST_RESOURCE_NAME)
- IMPLEMENTATION(CONSTANT_MANIFEST_RESOURCE_IMPLEMENTATION))
-
#define CONSTANT_ASSEMBLY_PROCESSOR_PROCESSOR 0
-DEF_TABLE_MASK(METHOD_AssemblyProcessor, 1,
- INT32(CONSTANT_ASSEMBLY_PROCESSOR_PROCESSOR))
-
#define CONSTANT_ASSEMBLY_OS_PLATFORM_ID 0
#define CONSTANT_ASSEMBLY_OS_MAJOR_VERSION 1
#define CONSTANT_ASSEMBLY_OS_MINOR_VERSION 2
-DEF_TABLE_MASK(METHOD_AssemblyOS, 3,
- INT32(CONSTANT_ASSEMBLY_OS_PLATFORM_ID)
- INT32(CONSTANT_ASSEMBLY_OS_MAJOR_VERSION)
- INT32(CONSTANT_ASSEMBLY_OS_MINOR_VERSION))
-
#define CONSTANT_FILE_FLAGS 0
#define CONSTANT_FILE_NAME 1
#define CONSTANT_FILE_HASH_VALUE 2
-DEF_TABLE_MASK(METHOD_File, 3,
- INT32(CONSTANT_FILE_FLAGS)
- STRING(CONSTANT_FILE_NAME)
- BLOB(CONSTANT_FILE_HASH_VALUE))
-
-
} // end namespace n3
#endif
Modified: vmkit/trunk/lib/N3/VMCore/BackTrace.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/BackTrace.cpp?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/BackTrace.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/BackTrace.cpp Wed Jun 25 04:59:39 2008
@@ -34,17 +34,17 @@
if (code) {
VMMethod* meth = (VMMethod*)code->getMetaInfo();
if (meth) {
- printf("; %p in %s\n", ips[n - 1], meth->printString());
+ printf("; %p in %s\n", (void*)ips[n - 1], meth->printString());
} else {
- printf("; %p in %s\n", ips[n - 1], "unknown");
+ printf("; %p in %s\n", (void*)ips[n - 1], "unknown");
}
} else {
Dl_info info;
int res = dladdr(ips[n++], &info);
if (res != 0) {
- printf("; %p in %s\n", ips[n - 1], info.dli_sname);
+ printf("; %p in %s\n", (void*)ips[n - 1], info.dli_sname);
} else {
- printf("; %p in Unknown\n", ips[n - 1]);
+ printf("; %p in Unknown\n", (void*)ips[n - 1]);
}
}
}
Modified: vmkit/trunk/lib/N3/VMCore/CLIJit.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/CLIJit.cpp?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/CLIJit.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/CLIJit.cpp Wed Jun 25 04:59:39 2008
@@ -399,7 +399,7 @@
void CLIJit::makeArgs(const FunctionType* type, std::vector<Value*>& Args,
bool structReturn) {
uint32 size = type->getNumParams();
- Value* args[size];
+ Value** args = (Value**)alloca(sizeof(Value*) * size);
sint32 index = size - 1;
FunctionType::param_iterator e = type->param_end();
e--;
@@ -486,7 +486,7 @@
VMClassArray* type = (VMClassArray*)meth->classDef;
uint32 dims = type->dims;
- Value* args[dims];
+ Value** args = (Value**)alloca(sizeof(Value*) * dims);
Value* val = 0;
if (func == 0) {
val = pop();
@@ -611,7 +611,7 @@
} else if (type->isArray) {
VMClassArray* arrayType = (VMClassArray*)type;
Value* valCl = new LoadInst(arrayType->llvmVar(), "", currentBlock);
- Value* args[arrayType->dims + 1];
+ Value** args = (Value**)alloca(sizeof(Value*) * (arrayType->dims + 1));
args[0] = valCl;
for (int cur = arrayType->dims; cur > 0; --cur)
@@ -2159,7 +2159,6 @@
// LLVM does not allow calling functions from other modules in verifier
//PM->add(llvm::createVerifierPass()); // Verify that input is correct
- addPass(PM, mvm::createEscapeAnalysisPass(CLIJit::objConsLLVM, CLIJit::objInitLLVM));
addPass(PM, llvm::createCFGSimplificationPass()); // Clean up disgusting code
addPass(PM, llvm::createScalarReplAggregatesPass());// Kill useless allocas
addPass(PM, llvm::createInstructionCombiningPass()); // Clean up after IPCP & DAE
Modified: vmkit/trunk/lib/N3/VMCore/LockedMap.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/LockedMap.h?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/LockedMap.h (original)
+++ vmkit/trunk/lib/N3/VMCore/LockedMap.h Wed Jun 25 04:59:39 2008
@@ -97,7 +97,7 @@
}
}
- virtual void print(mvm::PrintBuffer* buf) {
+ virtual void print(mvm::PrintBuffer* buf) const {
buf->write("Hashtable<>");
}
@@ -217,7 +217,7 @@
}
}
- virtual void print(mvm::PrintBuffer* buf) {
+ virtual void print(mvm::PrintBuffer* buf) const {
buf->write("UTF8 Hashtable<>");
}
Added: vmkit/trunk/lib/N3/VMCore/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/Makefile (added)
+++ vmkit/trunk/lib/N3/VMCore/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,15 @@
+##===- lib/JnJVM/VMCore/Makefile ---------------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../../..
+
+CXX.Flags += -Wno-unused
+LIBRARYNAME = N3
+include $(LEVEL)/Makefile.common
+
+CXX.Flags += -Wno-unused
Removed: vmkit/trunk/lib/N3/VMCore/Makefile.am
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/Makefile.am?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/Makefile.am (original)
+++ vmkit/trunk/lib/N3/VMCore/Makefile.am (removed)
@@ -1,15 +0,0 @@
-EXTRA_DIST = SignatureNames.def OpcodeNames.def
-lib_LTLIBRARIES = libN3.la
-
-PREFIX=@prefix@
-
-libN3_la_SOURCES = \
- Assembly.cpp Assembly.h CLIAccess.h CLISignature.cpp LockedMap.cpp LockedMap.h N3.cpp N3.h \
- Reader.cpp Reader.h VMArray.cpp VMArray.h VMCache.cpp VMCache.h VMClass.cpp VMClass.h \
- VMObject.cpp VMObject.h VMThread.cpp VMThread.h VirtualMachine.cpp VirtualMachine.h \
- VirtualTables.cpp CLIString.cpp CLIString.h N3Initialise.cpp CLIJitMeta.cpp CLIJit.h CLIJit.cpp \
- Opcodes.cpp NativeUtil.h NativeUtil.cpp PNetLib.cpp N3ModuleProvider.cpp N3ModuleProvider.h \
- PNetLib.h BackTrace.cpp LowerArrayLength.cpp
-
-libN3_la_CXXFLAGS =-DPREFIX=\"$(PREFIX)\" -W -Wall -ansi -Wno-unused-parameter -Wno-long-long -Wno-unused-function -fno-omit-frame-pointer -g -O2 -I at pnetlocalprefix@/include \
- -I at pnetlocalprefix@/engine
Modified: vmkit/trunk/lib/N3/VMCore/PNetLib.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/PNetLib.cpp?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/PNetLib.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/PNetLib.cpp Wed Jun 25 04:59:39 2008
@@ -70,26 +70,26 @@
#ifndef USE_GC_BOEHM
int GC_invoke_finalizers (void) { return 0; }
int GC_should_invoke_finalizers (void) { return 0; }
-void GC_register_finalizer_no_order(void) { return; }
+void GC_register_finalizer_no_order(void*, void (*)(void*, void*), void*, void (**)(void*, void*), void**) { return; }
void GC_gcollect(void) {}
-void GC_malloc_uncollectable(void) {}
-void GC_exclude_static_roots(void) {}
-void GC_free(void) {}
+void* GC_malloc_uncollectable(size_t) { return 0; }
+void GC_exclude_static_roots(void*, void*) {}
+void GC_free(void*) {}
void GC_malloc_explicitly_typed(void) {}
-void GC_get_heap_size(void) {}
-void GC_register_disappearing_link(void) {}
-void GC_general_register_disappearing_link(void) {}
-void GC_pthread_sigmask(void) {}
-void GC_pthread_detach(void) {}
-void GC_pthread_create(void) {}
-void GC_malloc(void) {}
+size_t GC_get_heap_size(void) {return 0;}
+int GC_register_disappearing_link(void**) { return 0; }
+int GC_general_register_disappearing_link(void**, void*) { return 0; }
+int GC_pthread_sigmask(int, const sigset_t*, sigset_t*) { return 0; }
+int GC_pthread_detach(pthread_t) { return 0; }
+int GC_pthread_create(pthread_t*, const pthread_attr_t*, void* (*)(void*), void*) { return 0; }
+void* GC_malloc(size_t) { return 0; }
void GC_make_descriptor(void) {}
-void GC_unregister_disappearing_link(void) {}
-void GC_finalizer_notifier(void) {}
-void GC_java_finalization(void) {}
-void GC_finalize_on_demand(void) {}
-void GC_set_max_heap_size(void) {}
-void GC_malloc_atomic(void) {}
+int GC_unregister_disappearing_link(void**) { return 0; }
+void (*GC_finalizer_notifier)(void);
+int GC_java_finalization;
+int GC_finalize_on_demand;
+void GC_set_max_heap_size(GC_word) {}
+void* GC_malloc_atomic(size_t) { return 0; }
#endif
// Fake termcap symbols
Modified: vmkit/trunk/lib/N3/VMCore/VMArray.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/VMArray.h?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/VMArray.h (original)
+++ vmkit/trunk/lib/N3/VMCore/VMArray.h Wed Jun 25 04:59:39 2008
@@ -30,7 +30,7 @@
public:
static VirtualTable* VT;
sint32 size;
- void* elements[0];
+ void* elements[1];
static const sint32 MaxArraySize;
static const llvm::Type* llvmType;
@@ -48,7 +48,7 @@
public: \
static VirtualTable* VT; \
static const llvm::Type* llvmType; \
- elmt elements[0]; \
+ elmt elements[1]; \
static name *acons(sint32 n, VMClassArray* cl); \
void initialise(VMCommonClass* atype, sint32 n); \
elmt at(sint32) const; \
@@ -73,7 +73,7 @@
public:
static VirtualTable* VT;
static const llvm::Type* llvmType;
- VMObject* elements[0];
+ VMObject* elements[1];
static ArrayObject *acons(sint32 n, VMClassArray* cl);
void initialise(VMCommonClass* atype, sint32 n);
VMObject* at(sint32) const;
@@ -85,7 +85,7 @@
class UTF8 : public VMArray {
public:
static VirtualTable* VT;
- uint16 elements[0];
+ uint16 elements[1];
static const llvm::Type* llvmType;
static UTF8* acons(sint32 n, VMClassArray* cl);
Modified: vmkit/trunk/lib/N3/VMCore/VirtualTables.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/VirtualTables.cpp?rev=52708&r1=52707&r2=52708&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/VirtualTables.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/VirtualTables.cpp Wed Jun 25 04:59:39 2008
@@ -123,15 +123,15 @@
}
-ARRAYTRACER(ArrayUInt8);
-ARRAYTRACER(ArraySInt8);
-ARRAYTRACER(ArrayUInt16);
-ARRAYTRACER(ArraySInt16);
-ARRAYTRACER(ArrayUInt32);
-ARRAYTRACER(ArraySInt32);
-ARRAYTRACER(ArrayLong);
-ARRAYTRACER(ArrayFloat);
-ARRAYTRACER(ArrayDouble);
+ARRAYTRACER(ArrayUInt8)
+ARRAYTRACER(ArraySInt8)
+ARRAYTRACER(ArrayUInt16)
+ARRAYTRACER(ArraySInt16)
+ARRAYTRACER(ArrayUInt32)
+ARRAYTRACER(ArraySInt32)
+ARRAYTRACER(ArrayLong)
+ARRAYTRACER(ArrayFloat)
+ARRAYTRACER(ArrayDouble)
#undef ARRAYTRACER
Removed: vmkit/trunk/lib/N3/pnet-0.7.4.patch
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/pnet-0.7.4.patch?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/lib/N3/pnet-0.7.4.patch (original)
+++ vmkit/trunk/lib/N3/pnet-0.7.4.patch (removed)
@@ -1,72 +0,0 @@
---- pnet-0.7.4/configure.in 2006-01-15 06:17:01.000000000 +0100
-+++ pnet-0.7.4/configure.in 2006-12-19 11:03:05.000000000 +0100
-@@ -19,6 +19,7 @@
- AC_PROG_RANLIB
- AC_PROG_YACC
- AM_PROG_LEX
-+AM_PROG_LIBTOOL
-
- AC_PATH_PROG(TREECC, treecc,, ${prefix}/bin:$PATH)
- if test -z "$TREECC" ; then
-
---- pnet-0.7.4/engine/Makefile.am 2005-12-19 19:00:35.000000000 +0100
-+++ /home/varth/project/pnet-0.7.4/engine/Makefile.am 2006-12-19 11:17:07.000000000 +0100
-@@ -1,4 +1,5 @@
- bin_PROGRAMS = ilrun ilverify
-+lib_LTLIBRARIES = libStdio.la libTime.la
- lib_LIBRARIES = libILEngine.a
- man_MANS = ilrun.1 ilverify.1
-
-@@ -76,6 +77,11 @@
- $(UNROLL_INCLUDES) \
- $(VERIFY_INCLUDES)
-
-+
-+libStdio_la_SOURCES = lib_stdio.c
-+libTime_la_SOURCES = lib_time.c
-+
-+
- BUILT_SOURCES = gen_marshal.c \
- gen_marshal.h
-
---- pnet-0.7.4/support/Makefile.am 2005-08-22 14:39:20.000000000 +0200
-+++ pnet-0.7.4/support/Makefile.am 2006-12-19 19:18:10.000000000 +0100
-@@ -1,3 +1,4 @@
-+lib_LTLIBRARIES = libILSupport.la
- lib_LIBRARIES = libILSupport.a
- noinst_PROGRAMS = mkcategory mknumber mkcase
- EXTRA_DIST = gen_errno.sh
-@@ -8,7 +9,7 @@
-
- BUILT_SOURCES = errno_map.c
-
--libILSupport_a_SOURCES = aes.c \
-+libILSupport_la_SOURCES = aes.c \
- allocate.c \
- ansi.c \
- bignum.c \
-@@ -30,7 +31,6 @@
- guid.c \
- hash.c \
- hashtab.c \
-- hb_gc.c \
- interlocked.h \
- interlocked_any.h \
- interlocked_x86.h \
-@@ -85,6 +85,8 @@
- write_float.c \
- xml.c
-
-+libILSupport_a_SOURCES = $(libILSupport_la_SOURCES) hb_gc.c
-+
- mkcategory_SOURCES = mkcategory.c
-
- mknumber_SOURCES = mknumber.c
---- pnet-0.7.4/auto_gen.sh 2002-12-01 23:58:37.000000000 +0100
-+++ pnet-0.7.4/auto_gen.sh 2006-12-19 11:05:39.000000000 +0100
-@@ -34,4 +34,5 @@
- # Run automake and autoconf.
- automake --add-missing --copy $AM_FLAGS
- autoconf
-+libtoolize --copy --force
- exit 0
Added: vmkit/trunk/patches/vmkit-llvm-ppc.patch
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/patches/vmkit-llvm-ppc.patch?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/patches/vmkit-llvm-ppc.patch (added)
+++ vmkit/trunk/patches/vmkit-llvm-ppc.patch Wed Jun 25 04:59:39 2008
@@ -0,0 +1,339 @@
+Index: PPCInstrInfo.td
+===================================================================
+--- PPCInstrInfo.td (revision 50006)
++++ PPCInstrInfo.td (working copy)
+@@ -1212,6 +1212,8 @@
+ (BL_ELF texternalsym:$dst)>;
+
+ // Hi and Lo for Darwin Global Addresses.
++def : Pat<(PPChi texternalsym:$in, 0), (LIS texternalsym:$in)>;
++def : Pat<(PPClo texternalsym:$in, 0), (LI texternalsym:$in)>;
+ def : Pat<(PPChi tglobaladdr:$in, 0), (LIS tglobaladdr:$in)>;
+ def : Pat<(PPClo tglobaladdr:$in, 0), (LI tglobaladdr:$in)>;
+ def : Pat<(PPChi tconstpool:$in, 0), (LIS tconstpool:$in)>;
+Index: PPCJITInfo.cpp
+===================================================================
+--- PPCJITInfo.cpp (revision 50006)
++++ PPCJITInfo.cpp (working copy)
+@@ -13,12 +13,16 @@
+
+ #define DEBUG_TYPE "jit"
+ #include "PPCJITInfo.h"
++#include "PPCRegisterInfo.h"
+ #include "PPCRelocations.h"
+ #include "PPCTargetMachine.h"
+ #include "llvm/Function.h"
+ #include "llvm/CodeGen/MachineCodeEmitter.h"
+ #include "llvm/Config/alloca.h"
++#include "llvm/ExecutionEngine/ExecutionEngine.h"
+ #include "llvm/Support/Debug.h"
++#include "llvm/Support/Dwarf.h"
++#include "llvm/Target/TargetOptions.h"
+ #include <set>
+ using namespace llvm;
+
+@@ -53,24 +57,27 @@
+ if (Offset >= -(1 << 23) && Offset < (1 << 23)) { // In range?
+ AtI[0] = BUILD_B(Offset, isCall); // b/bl target
+ } else if (!is64Bit) {
+- AtI[0] = BUILD_LIS(12, To >> 16); // lis r12, hi16(address)
++ AtI[0] = BUILD_B(0, false); // thread safety
+ AtI[1] = BUILD_ORI(12, 12, To); // ori r12, r12, lo16(address)
+ AtI[2] = BUILD_MTCTR(12); // mtctr r12
+ AtI[3] = BUILD_BCTR(isCall); // bctr/bctrl
++ AtI[0] = BUILD_LIS(12, To >> 16); // lis r12, hi16(address)
+ } else {
+- AtI[0] = BUILD_LIS(12, To >> 48); // lis r12, hi16(address)
++ AtI[0] = BUILD_B(0, false); // thread safety
+ AtI[1] = BUILD_ORI(12, 12, To >> 32); // ori r12, r12, lo16(address)
+ AtI[2] = BUILD_SLDI(12, 12, 32); // sldi r12, r12, 32
+ AtI[3] = BUILD_ORIS(12, 12, To >> 16); // oris r12, r12, hi16(address)
+ AtI[4] = BUILD_ORI(12, 12, To); // ori r12, r12, lo16(address)
+ AtI[5] = BUILD_MTCTR(12); // mtctr r12
+ AtI[6] = BUILD_BCTR(isCall); // bctr/bctrl
++ AtI[0] = BUILD_LIS(12, To >> 48); // lis r12, hi16(address)
+ }
+ }
+
+ extern "C" void PPC32CompilationCallback();
+ extern "C" void PPC64CompilationCallback();
+
++
+ #if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)) && \
+ !defined(__ppc64__)
+ // CompilationCallback stub - We can't use a C function with inline assembly in
+@@ -144,6 +151,9 @@
+ // it, because we the prolog/epilog inserted by GCC won't work for us. Instead,
+ // write our own wrapper, which does things our way, so we have complete control
+ // over register saving and restoring.
++
++# define CFI(x) x
++
+ asm(
+ ".text\n"
+ ".align 2\n"
+@@ -156,19 +166,29 @@
+ // FIXME Layout
+ // 8 double registers - 64 bytes
+ // 8 int registers - 32 bytes
++ CFI(".cfi_startproc\n")
++ "stwu 1, -104(1)\n"
++ CFI(".cfi_adjust_cfa_offset 104\n")
+ "mflr 0\n"
+- "stw 0, 4(1)\n"
+- "stwu 1, -104(1)\n"
++ "stw 0, 108(1)\n"
++ CFI(".cfi_offset lr, 4\n")
+ // Save all int arg registers
+- "stw 10, 100(1)\n" "stw 9, 96(1)\n"
+- "stw 8, 92(1)\n" "stw 7, 88(1)\n"
+- "stw 6, 84(1)\n" "stw 5, 80(1)\n"
+- "stw 4, 76(1)\n" "stw 3, 72(1)\n"
++ "stw 10, 100(1)\n"
++ "stw 9, 96(1)\n"
++ "stw 8, 92(1)\n"
++ "stw 7, 88(1)\n"
++ "stw 6, 84(1)\n"
++ "stw 5, 80(1)\n"
++ "stw 4, 76(1)\n"
++ "stw 3, 72(1)\n"
+ // Save all call-clobbered FP regs.
+ "stfd 8, 64(1)\n"
+- "stfd 7, 56(1)\n" "stfd 6, 48(1)\n"
+- "stfd 5, 40(1)\n" "stfd 4, 32(1)\n"
+- "stfd 3, 24(1)\n" "stfd 2, 16(1)\n"
++ "stfd 7, 56(1)\n"
++ "stfd 6, 48(1)\n"
++ "stfd 5, 40(1)\n"
++ "stfd 4, 32(1)\n"
++ "stfd 3, 24(1)\n"
++ "stfd 2, 16(1)\n"
+ "stfd 1, 8(1)\n"
+ // Arguments to Compilation Callback:
+ // r3 - our lr (address of the call instruction in stub plus 4)
+@@ -181,21 +201,29 @@
+ "bl PPCCompilationCallbackC\n"
+ "mtctr 3\n"
+ // Restore all int arg registers
+- "lwz 10, 100(1)\n" "lwz 9, 96(1)\n"
+- "lwz 8, 92(1)\n" "lwz 7, 88(1)\n"
+- "lwz 6, 84(1)\n" "lwz 5, 80(1)\n"
+- "lwz 4, 76(1)\n" "lwz 3, 72(1)\n"
++ "lwz 10, 100(1)\n"
++ "lwz 9, 96(1)\n"
++ "lwz 8, 92(1)\n"
++ "lwz 7, 88(1)\n"
++ "lwz 6, 84(1)\n"
++ "lwz 5, 80(1)\n"
++ "lwz 4, 76(1)\n"
++ "lwz 3, 72(1)\n"
+ // Restore all FP arg registers
+ "lfd 8, 64(1)\n"
+- "lfd 7, 56(1)\n" "lfd 6, 48(1)\n"
+- "lfd 5, 40(1)\n" "lfd 4, 32(1)\n"
+- "lfd 3, 24(1)\n" "lfd 2, 16(1)\n"
++ "lfd 7, 56(1)\n"
++ "lfd 6, 48(1)\n"
++ "lfd 5, 40(1)\n"
++ "lfd 4, 32(1)\n"
++ "lfd 3, 24(1)\n"
++ "lfd 2, 16(1)\n"
+ "lfd 1, 8(1)\n"
+ // Pop 3 frames off the stack and branch to target
+ "lwz 1, 104(1)\n"
+ "lwz 0, 4(1)\n"
+ "mtlr 0\n"
+ "bctr\n"
++ CFI(".cfi_endproc\n")
+ );
+ #else
+ void PPC32CompilationCallback() {
+@@ -325,6 +353,31 @@
+ return is64Bit ? PPC64CompilationCallback : PPC32CompilationCallback;
+ }
+
++static const char* GetCommonFrame32() {
++ /*
++ // Size of common frame
++ MCE.emitWordBE(16);
++ // Common frame
++ MCE.emitWordBE(0);
++ MCE.emitByte(1);
++ MCE.emitByte('z');
++ MCE.emitByte('R');
++ MCE.emitByte(0);
++ MCE.emitByte(1);
++ MCE.emitByte(-4 & 0x7f);
++ MCE.emitByte(0x41);
++ MCE.emitByte(1);
++ MCE.emitByte(16);
++ MCE.emitByte(0xc);
++ MCE.emitByte(1);
++ MCE.emitByte(0);*/
++ static const char CF[] = {
++ 0, 0, 0, 16, 0, 0, 0, 0, 1, 'z', 'R', 0, 1, -4 & 0x7f,
++ 0x41, 1, 16, 0xc, 1, 0
++ };
++ return CF;
++}
++
+ #if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)) && \
+ defined(__APPLE__)
+ extern "C" void sys_icache_invalidate(const void *Addr, size_t len);
+@@ -358,21 +411,26 @@
+ SyncICache((void*)Addr, 7*4);
+ return MCE.finishFunctionStub(F);
+ }
+-
+- MCE.startFunctionStub(F, 10*4);
++
++ if (ExceptionHandling && !is64Bit) {
++ MCE.startFunctionStub(F, 10*4 + 44);
++ } else {
++ MCE.startFunctionStub(F, 10*4);
++ }
++
+ intptr_t Addr = (intptr_t)MCE.getCurrentPCValue();
+ if (is64Bit) {
++ MCE.emitWordBE(0x7d6802a6); // mflr r11
++ MCE.emitWordBE(0xf9610010); // std r11, 16(r1)
+ MCE.emitWordBE(0xf821ffb1); // stdu r1,-80(r1)
++ } else if (TM.getSubtargetImpl()->isMachoABI()){
+ MCE.emitWordBE(0x7d6802a6); // mflr r11
+- MCE.emitWordBE(0xf9610060); // std r11, 96(r1)
+- } else if (TM.getSubtargetImpl()->isMachoABI()){
++ MCE.emitWordBE(0x91610008); // stw r11, 8(r1)
+ MCE.emitWordBE(0x9421ffe0); // stwu r1,-32(r1)
++ } else {
+ MCE.emitWordBE(0x7d6802a6); // mflr r11
+- MCE.emitWordBE(0x91610028); // stw r11, 40(r1)
+- } else {
++ MCE.emitWordBE(0x91610004); // stw r11, 4(r1)
+ MCE.emitWordBE(0x9421ffe0); // stwu r1,-32(r1)
+- MCE.emitWordBE(0x7d6802a6); // mflr r11
+- MCE.emitWordBE(0x91610024); // stw r11, 36(r1)
+ }
+ intptr_t BranchAddr = (intptr_t)MCE.getCurrentPCValue();
+ MCE.emitWordBE(0);
+@@ -384,6 +442,42 @@
+ MCE.emitWordBE(0);
+ EmitBranchToAt(BranchAddr, (intptr_t)Fn, true, is64Bit);
+ SyncICache((void*)Addr, 10*4);
++ intptr_t EndAddr = (intptr_t)MCE.getCurrentPCValue();
++
++ if (ExceptionHandling && !is64Bit) {
++ // Size of Eh section
++ MCE.emitWordBE(32);
++ // Eh section
++ MCE.emitWordBE(MCE.getCurrentPCValue() - (intptr_t)GetCommonFrame32());
++ MCE.emitWordBE(Addr - MCE.getCurrentPCValue());
++ MCE.emitWordBE(EndAddr - Addr);
++ MCE.emitByte(0);
++ MCE.emitByte(dwarf::DW_CFA_advance_loc4);
++ MCE.emitWordBE(8);
++ MCE.emitByte(dwarf::DW_CFA_def_cfa_offset);
++ MCE.emitByte(32);
++ MCE.emitByte(dwarf::DW_CFA_offset_extended_sf);
++ MCE.emitByte(TM.getRegisterInfo()->getDwarfRegNum(PPC::LR, true));
++ if (TM.getSubtargetImpl()->isMachoABI()){
++ MCE.emitByte(-2 & 0x7f);
++ } else {
++ MCE.emitByte(-1 & 0x7f);
++ }
++ MCE.emitByte(dwarf::DW_CFA_advance_loc4);
++ MCE.emitWordBE(4);
++ MCE.emitByte(dwarf::DW_CFA_def_cfa_register);
++ MCE.emitByte(1);
++ // Alignment
++ MCE.emitByte(0);
++ MCE.emitByte(0);
++
++ // Two zero for the unwind runtime
++ MCE.emitWordBE(0);
++ MCE.emitWordBE(0);
++
++ SyncICache((void*)EndAddr, 44);
++ ExecutionEngine::RegisterTable((void*)EndAddr);
++ }
+ return MCE.finishFunctionStub(F);
+ }
+
+Index: PPCISelLowering.cpp
+===================================================================
+--- PPCISelLowering.cpp (revision 50006)
++++ PPCISelLowering.cpp (working copy)
+@@ -175,10 +175,12 @@
+ // We want to legalize GlobalAddress and ConstantPool nodes into the
+ // appropriate instructions to materialize the address.
+ setOperationAction(ISD::GlobalAddress, MVT::i32, Custom);
++ setOperationAction(ISD::ExternalSymbol , MVT::i32 , Custom);
+ setOperationAction(ISD::GlobalTLSAddress, MVT::i32, Custom);
+ setOperationAction(ISD::ConstantPool, MVT::i32, Custom);
+ setOperationAction(ISD::JumpTable, MVT::i32, Custom);
+ setOperationAction(ISD::GlobalAddress, MVT::i64, Custom);
++ setOperationAction(ISD::ExternalSymbol , MVT::i64 , Custom);
+ setOperationAction(ISD::GlobalTLSAddress, MVT::i64, Custom);
+ setOperationAction(ISD::ConstantPool, MVT::i64, Custom);
+ setOperationAction(ISD::JumpTable, MVT::i64, Custom);
+@@ -745,6 +747,36 @@
+ return isIntS16Immediate(Op.Val, Imm);
+ }
+
++ static SDOperand LowerExternalSymbol(SDOperand Op, SelectionDAG &DAG) {
++ MVT::ValueType PtrVT = Op.getValueType();
++ ExternalSymbolSDNode *GSDB = dyn_cast<ExternalSymbolSDNode>(Op);
++ SDOperand GA = DAG.getTargetExternalSymbol(GSDB->getSymbol(), PtrVT);
++ SDOperand Zero = DAG.getConstant(0, PtrVT);
++
++ const TargetMachine &TM = DAG.getTarget();
++
++ SDOperand Hi = DAG.getNode(PPCISD::Hi, PtrVT, GA, Zero);
++ SDOperand Lo = DAG.getNode(PPCISD::Lo, PtrVT, GA, Zero);
++
++ // If this is a non-darwin platform, we don't support non-static relo models
++ // yet.
++ if (TM.getRelocationModel() == Reloc::Static ||
++ !TM.getSubtarget<PPCSubtarget>().isDarwin()) {
++ // Generate non-pic code that has direct accesses to globals.
++ // The address of the global is just (hi(&g)+lo(&g)).
++ return DAG.getNode(ISD::ADD, PtrVT, Hi, Lo);
++ }
++
++ if (TM.getRelocationModel() == Reloc::PIC_) {
++ // With PIC, the first instruction is actually "GR+hi(&G)".
++ Hi = DAG.getNode(ISD::ADD, PtrVT,
++ DAG.getNode(PPCISD::GlobalBaseReg, PtrVT), Hi);
++ }
++
++ Lo = DAG.getNode(ISD::ADD, PtrVT, Hi, Lo);
++
++ return Lo;
++ }
+
+ /// SelectAddressRegReg - Given the specified addressed, check to see if it
+ /// can be represented as an indexed [r+r] operation. Returns false if it
+@@ -2130,11 +2162,11 @@
+ // If the callee is a GlobalAddress/ExternalSymbol node (quite common, every
+ // direct call is) turn it into a TargetGlobalAddress/TargetExternalSymbol
+ // node so that legalize doesn't hack it.
+- if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee))
+- Callee = DAG.getTargetGlobalAddress(G->getGlobal(), Callee.getValueType());
+- else if (ExternalSymbolSDNode *S = dyn_cast<ExternalSymbolSDNode>(Callee))
+- Callee = DAG.getTargetExternalSymbol(S->getSymbol(), Callee.getValueType());
+- else if (SDNode *Dest = isBLACompatibleAddress(Callee, DAG))
++ //if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee))
++ // Callee = DAG.getTargetGlobalAddress(G->getGlobal(), Callee.getValueType());
++ //if (ExternalSymbolSDNode *S = dyn_cast<ExternalSymbolSDNode>(Callee))
++ // Callee = DAG.getTargetExternalSymbol(S->getSymbol(), Callee.getValueType());
++ if (SDNode *Dest = isBLACompatibleAddress(Callee, DAG))
+ // If this is an absolute destination address, use the munged value.
+ Callee = SDOperand(Dest, 0);
+ else {
+@@ -3506,6 +3538,7 @@
+ default: assert(0 && "Wasn't expecting to be able to lower this!");
+ case ISD::ConstantPool: return LowerConstantPool(Op, DAG);
+ case ISD::GlobalAddress: return LowerGlobalAddress(Op, DAG);
++ case ISD::ExternalSymbol: return LowerExternalSymbol(Op, DAG);
+ case ISD::GlobalTLSAddress: return LowerGlobalTLSAddress(Op, DAG);
+ case ISD::JumpTable: return LowerJumpTable(Op, DAG);
+ case ISD::SETCC: return LowerSETCC(Op, DAG);
Added: vmkit/trunk/patches/vmkit-llvm-x86.patch
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/patches/vmkit-llvm-x86.patch?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/patches/vmkit-llvm-x86.patch (added)
+++ vmkit/trunk/patches/vmkit-llvm-x86.patch Wed Jun 25 04:59:39 2008
@@ -0,0 +1,37 @@
+Index: X86Subtarget.cpp
+===================================================================
+--- X86Subtarget.cpp (revision 50008)
++++ X86Subtarget.cpp (working copy)
+@@ -127,7 +127,7 @@
+ return;
+
+ X86::GetCpuIDAndInfo(0x1, &EAX, &EBX, &ECX, &EDX);
+-
++#if 0
+ if ((EDX >> 23) & 0x1) X86SSELevel = MMX;
+ if ((EDX >> 25) & 0x1) X86SSELevel = SSE1;
+ if ((EDX >> 26) & 0x1) X86SSELevel = SSE2;
+@@ -135,7 +135,9 @@
+ if ((ECX >> 9) & 0x1) X86SSELevel = SSSE3;
+ if ((ECX >> 19) & 0x1) X86SSELevel = SSE41;
+ if ((ECX >> 20) & 0x1) X86SSELevel = SSE42;
+-
++#else
++ X86SSELevel = MMX;
++#endif
+ if (memcmp(text.c, "GenuineIntel", 12) == 0 ||
+ memcmp(text.c, "AuthenticAMD", 12) == 0) {
+ X86::GetCpuIDAndInfo(0x80000001, &EAX, &EBX, &ECX, &EDX);
+Index: X86JITInfo.cpp
+===================================================================
+--- X86JITInfo.cpp (revision 50008)
++++ X86JITInfo.cpp (working copy)
+@@ -60,7 +60,7 @@
+ // FIXME: Disable this until we really want to use it. Also, we will
+ // need to add some workarounds for compilers, which support
+ // only subset of these directives.
+-# define CFI(x)
++# define CFI(x) x
+ #endif
+
+ // Provide a wrapper for X86CompilationCallback2 that saves non-traditional
Added: vmkit/trunk/tools/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/tools/Makefile (added)
+++ vmkit/trunk/tools/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,14 @@
+##===- tools/Makefile --------------------------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ..
+
+PARALLEL_DIRS = jnjvm n3
+
+include $(LEVEL)/Makefile.common
+
Propchange: vmkit/trunk/tools/Makefile
------------------------------------------------------------------------------
svn:executable = *
Added: vmkit/trunk/tools/jnjvm/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/jnjvm/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/tools/jnjvm/Makefile (added)
+++ vmkit/trunk/tools/jnjvm/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,17 @@
+##===- tools/jnjvm/Makefile --------------------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../..
+
+include $(LEVEL)/Makefile.config
+
+TOOLNAME = jnjvm
+USEDLIBS = Allocator CommonThread Mvm JnJVM Classpath Main $(GCLIB)
+LINK_COMPONENTS = engine scalaropts instrumentation ipa ipo
+
+include $(LEVEL)/Makefile.common
Propchange: vmkit/trunk/tools/jnjvm/Makefile
------------------------------------------------------------------------------
svn:executable = *
Added: vmkit/trunk/tools/n3/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/n3/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/tools/n3/Makefile (added)
+++ vmkit/trunk/tools/n3/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,21 @@
+##===- tools/n3/Makefile -----------------------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../..
+
+include $(LEVEL)/Makefile.config
+
+TOOLNAME = n3
+LINK_COMPONENTS = engine scalaropts instrumentation ipa ipo
+USEDLIBS = Allocator CommonThread Mvm N3 Main $(GCLIB)
+
+include $(LEVEL)/Makefile.common
+
+LIBS += $(PNETLIB)/engine/libILEngine.a $(PNETLIB)/image/libILImage.a $(PNETLIB)/support/libILSupport.a \
+ $(PNETLIB)/libffi/.libs/libffi.a $(PNETLIB)//dumpasm/libILDumpAsm.a
+
Propchange: vmkit/trunk/tools/n3/Makefile
------------------------------------------------------------------------------
svn:executable = *
Added: vmkit/trunk/tools/testAllocator/Main.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/testAllocator/Main.cpp?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/tools/testAllocator/Main.cpp (added)
+++ vmkit/trunk/tools/testAllocator/Main.cpp Wed Jun 25 04:59:39 2008
@@ -0,0 +1,123 @@
+//===------------------ main.cc - Mvm allocator ---------------------------===//
+//
+// Mvm
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "gcalloc.h"
+#include <stdio.h>
+#include <time.h>
+#include <stdlib.h>
+#include <math.h>
+#include <sys/time.h>
+
+unsigned int rand(unsigned int min, unsigned int max) {
+ return (unsigned int)nearbyint((((double)(max - min))*::rand())/(RAND_MAX + 1.0)) + min;
+}
+
+void tire(size_t n, size_t *vals, size_t *reallocs, size_t *frees) {
+ for(size_t i=0; i<n; i++) {
+ if(rand(0, 20))
+ vals[i] = rand(1, 256);
+ else
+ vals[i] = rand(256, 65536);
+ if(!rand(0, 10)) /* un chance sur 10 de réallouer */
+ if(rand(0, 20))
+ reallocs[i] = rand(1, 256);
+ else
+ reallocs[i] = rand(256, 65536);
+ else
+ reallocs[i] = 0;
+ if(rand(0, 10)) /* un chance sur 10 de ne pas libérer */
+ frees[i] = 1;
+ else
+ frees[i] = 0;
+ }
+}
+
+void printMesure(size_t n, size_t *vals, size_t *reallocs, size_t *frees, struct timeval *start, struct timeval *end) {
+ size_t totAllocated = 0;
+ size_t curAllocated = 0;
+ size_t na = 0;
+ size_t nr = 0;
+ size_t nf = 0;
+ size_t no = 0;
+
+ for(size_t i=0; i<n; i++) {
+ size_t here = vals[i] + reallocs[i];
+ if(reallocs[i]) {
+ na++;
+ nr++;
+ }
+ na++;
+ totAllocated += here;
+ if(!frees[i]) {
+ curAllocated += here;
+ no++;
+ } else
+ nf++;
+ }
+
+ printf("; %d allocations (%d reallocations, %d free, %d chunks)\n", na, nr, nf, no);
+ printf("; Allocated: %d bytes, current %d bytes\n", totAllocated, curAllocated);
+
+ struct timeval diff;
+ timersub(end, start, &diff);
+ double f = (double)diff.tv_sec + ((double)diff.tv_usec / 1000000.0);
+ printf("; time consumed: %fs\n", f);
+}
+
+void mesureAllocateur() {
+ size_t n = 512*1024;
+ size_t* vals = (size_t*)alloca(sizeof(size_t) * n);
+ size_t* reallocs = (size_t*)alloca(sizeof(size_t) * n);
+ size_t* frees = (size_t*)alloca(sizeof(size_t) * n);
+
+ printf("Tire une sequence d'allocations alléatoire\n");
+ tire(n, vals, reallocs, frees);
+
+ printf("test\n");
+ struct timeval start;
+ struct timeval end;
+ GCAllocator *a = new GCAllocator();
+
+ gettimeofday(&start, 0);
+ for(size_t i=0; i<n; i++) {
+ void *p = a->alloc(vals[i]);
+ if(reallocs[i])
+ p = a->realloc(p, reallocs[i]);
+ if(frees[i])
+ a->free(p);
+ }
+ gettimeofday(&end, 0);
+ delete a;
+
+ printMesure(n, vals, reallocs, frees, &start, &end);
+ printf("Press a key...\n");
+ getchar();
+
+ gettimeofday(&start, 0);
+ for(size_t i=0; i<n; i++) {
+ void *p = malloc(vals[i]);
+ ((char *)p)[0] = 1;
+ if(reallocs[i])
+ p = realloc(p, reallocs[i]);
+ if(frees[i])
+ free(p);
+ }
+ gettimeofday(&end, 0);
+ printMesure(n, vals, reallocs, frees, &start, &end);
+ printf("Press a key...\n");
+ getchar();
+
+}
+
+int main(int argc, char **argv) {
+ mesureAllocateur();
+
+ GCHash::destroy();
+ return 0;
+}
Added: vmkit/trunk/tools/testAllocator/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/testAllocator/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/tools/testAllocator/Makefile (added)
+++ vmkit/trunk/tools/testAllocator/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,16 @@
+##===- tools/testAllocator/Makefile ------------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../..
+
+TOOLNAME = testAllocator
+USEDLIBS = Allocator
+
+include $(LEVEL)/Makefile.common
+
+CXX.Flags += -I$(LEVEL)/lib/Mvm/Allocator
Added: vmkit/trunk/tools/testCollector/Main.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/testCollector/Main.cpp?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/tools/testCollector/Main.cpp (added)
+++ vmkit/trunk/tools/testCollector/Main.cpp Wed Jun 25 04:59:39 2008
@@ -0,0 +1,43 @@
+//===---------------- main.cc - Mvm Garbage Collector ---------------------===//
+//
+// Mvm
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "mvm/GC/GC.h"
+#include "mvm/Threads/Thread.h"
+#include <stdio.h>
+
+mvm::Key<mvm::Thread>* mvm::Thread::threadKey = 0;
+
+void destr(gc *me, size_t sz) {
+ printf("Destroy %p\n", me);
+}
+
+void trace(gc *me, size_t sz) {
+ // printf("Trace %p\n", me);
+}
+
+void marker(void*) {
+ // printf("Marker...\n");
+}
+
+int main(int argc, char **argv) {
+ mvm::Thread::initialise();
+ Collector::initialise(marker, 0);
+#ifdef MULTIPLE_GC
+ mvm::Thread::get()->GC->destroy();
+#else
+ Collector::destroy();
+#endif
+ return 0;
+}
+
+
+
+
+
+
Added: vmkit/trunk/tools/testCollector/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/testCollector/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/tools/testCollector/Makefile (added)
+++ vmkit/trunk/tools/testCollector/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,16 @@
+##===- tools/testCollector/Makefile ------------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../..
+
+TOOLNAME = CollectorTest
+USEDLIBS = Allocator GCMmap2 CommonThread
+
+include $(LEVEL)/Makefile.common
+
+CXX.Flags += -I$(LEVEL)/lib/Mvm/Allocator -I$(LEVEL)/lib/Mvm/GCMmap2
Propchange: vmkit/trunk/tools/testCollector/Makefile
------------------------------------------------------------------------------
svn:executable = *
Added: vmkit/trunk/tools/vtoffset/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/vtoffset/Makefile?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/tools/vtoffset/Makefile (added)
+++ vmkit/trunk/tools/vtoffset/Makefile Wed Jun 25 04:59:39 2008
@@ -0,0 +1,17 @@
+##===- tools/vtoffset/Makefile -------)---------------------*- Makefile -*-===##
+#
+# The vmkit project
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LEVEL = ../..
+
+include $(LEVEL)/Makefile.config
+
+TOOLNAME = vtoffset
+USEDLIBS = Mvm CommonThread Allocator $(GCLIB)
+LINK_COMPONENTS = engine
+
+include $(LEVEL)/Makefile.common
Added: vmkit/trunk/tools/vtoffset/VTOffset.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/vtoffset/VTOffset.cpp?rev=52708&view=auto
==============================================================================
--- vmkit/trunk/tools/vtoffset/VTOffset.cpp (added)
+++ vmkit/trunk/tools/vtoffset/VTOffset.cpp Wed Jun 25 04:59:39 2008
@@ -0,0 +1,97 @@
+//===-- VTOffset.cpp - Calculates compiler dependant VT offsets -----------===//
+//
+// The Micro Virtual Machine
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <dlfcn.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdio.h>
+
+#include "MvmGC.h"
+#include "mvm/PrintBuffer.h"
+#include "mvm/Threads/Thread.h"
+#include "mvm/Sigsegv.h"
+
+class Toto : public mvm::Object {
+public:
+
+ static VirtualTable* VT;
+ virtual void print(mvm::PrintBuffer* buf) const {
+ printf("in print!\n");
+ }
+ virtual int hashCode() {
+ printf("in hashcode!\n");
+ return 1;
+ }
+
+ virtual void tracer(size_t sz) {
+ printf("in tracer\n");
+ }
+
+ virtual void destroyer(size_t sz) {
+ printf("in destroy!\n");
+ }
+
+ ~Toto() {
+ printf("in delete Toto!\n");
+ }
+};
+
+class Tata : public Toto {
+ public:
+ static VirtualTable* VT;
+ ~Tata() {
+ printf("in delete Tata!\n");
+ }
+};
+
+VirtualTable* Toto::VT = 0;
+typedef void (*toto_t)(Toto* t);
+
+VirtualTable* Tata::VT = 0;
+typedef void (*tata_t)(Tata* t);
+
+int main(int argc, char **argv, char **envp) {
+ int base;
+
+ mvm::Object::initialise();
+
+ /*void* handle = sys_dlopen("libLisp.so", RTLD_LAZY | RTLD_GLOBAL);
+ boot func = (boot)sys_dlsym(handle, "boot");
+ func(argc, argv, envp);*/
+ {
+ Toto t;
+ Toto::VT =((void**)(void*)&t)[0];
+ toto_t* ptr = (toto_t*)Toto::VT;
+ printf("ptr[0] = %d, ptr[1]= %d, ptr[2] = %d ptr[3] = %d ptr[4] = %d ptr[5] = %d\n", ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5]);
+ ptr[0](&t);
+ //ptr[1](&t); // This should be ~gc
+ ptr[2](&t);
+ ptr[3](&t);
+ ptr[4](&t);
+ ptr[5](&t);
+}
+{
+ Tata t;
+ Tata::VT =((void**)(void*)&t)[0];
+ tata_t* ptr = (tata_t*)Tata::VT;
+ printf("ptr[0] = %d, ptr[1]= %d, ptr[2] = %d ptr[3] = %d ptr[4] = %d ptr[5] = %d\n", ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5]);
+ printf("Call des\n");
+ ptr[0](&t);
+ printf("End\n");
+ //ptr[1](&t); // This should be ~gc
+ ptr[2](&t);
+ ptr[3](&t);
+ ptr[4](&t);
+ ptr[5](&t);
+}
+Tata* t = gc_new(Tata)();
+ mvm::Thread::exit(0);
+
+ return 0;
+}
Removed: vmkit/trunk/vmkit-llvm-ppc.patch
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/vmkit-llvm-ppc.patch?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/vmkit-llvm-ppc.patch (original)
+++ vmkit/trunk/vmkit-llvm-ppc.patch (removed)
@@ -1,339 +0,0 @@
-Index: PPCInstrInfo.td
-===================================================================
---- PPCInstrInfo.td (revision 50006)
-+++ PPCInstrInfo.td (working copy)
-@@ -1212,6 +1212,8 @@
- (BL_ELF texternalsym:$dst)>;
-
- // Hi and Lo for Darwin Global Addresses.
-+def : Pat<(PPChi texternalsym:$in, 0), (LIS texternalsym:$in)>;
-+def : Pat<(PPClo texternalsym:$in, 0), (LI texternalsym:$in)>;
- def : Pat<(PPChi tglobaladdr:$in, 0), (LIS tglobaladdr:$in)>;
- def : Pat<(PPClo tglobaladdr:$in, 0), (LI tglobaladdr:$in)>;
- def : Pat<(PPChi tconstpool:$in, 0), (LIS tconstpool:$in)>;
-Index: PPCJITInfo.cpp
-===================================================================
---- PPCJITInfo.cpp (revision 50006)
-+++ PPCJITInfo.cpp (working copy)
-@@ -13,12 +13,16 @@
-
- #define DEBUG_TYPE "jit"
- #include "PPCJITInfo.h"
-+#include "PPCRegisterInfo.h"
- #include "PPCRelocations.h"
- #include "PPCTargetMachine.h"
- #include "llvm/Function.h"
- #include "llvm/CodeGen/MachineCodeEmitter.h"
- #include "llvm/Config/alloca.h"
-+#include "llvm/ExecutionEngine/ExecutionEngine.h"
- #include "llvm/Support/Debug.h"
-+#include "llvm/Support/Dwarf.h"
-+#include "llvm/Target/TargetOptions.h"
- #include <set>
- using namespace llvm;
-
-@@ -53,24 +57,27 @@
- if (Offset >= -(1 << 23) && Offset < (1 << 23)) { // In range?
- AtI[0] = BUILD_B(Offset, isCall); // b/bl target
- } else if (!is64Bit) {
-- AtI[0] = BUILD_LIS(12, To >> 16); // lis r12, hi16(address)
-+ AtI[0] = BUILD_B(0, false); // thread safety
- AtI[1] = BUILD_ORI(12, 12, To); // ori r12, r12, lo16(address)
- AtI[2] = BUILD_MTCTR(12); // mtctr r12
- AtI[3] = BUILD_BCTR(isCall); // bctr/bctrl
-+ AtI[0] = BUILD_LIS(12, To >> 16); // lis r12, hi16(address)
- } else {
-- AtI[0] = BUILD_LIS(12, To >> 48); // lis r12, hi16(address)
-+ AtI[0] = BUILD_B(0, false); // thread safety
- AtI[1] = BUILD_ORI(12, 12, To >> 32); // ori r12, r12, lo16(address)
- AtI[2] = BUILD_SLDI(12, 12, 32); // sldi r12, r12, 32
- AtI[3] = BUILD_ORIS(12, 12, To >> 16); // oris r12, r12, hi16(address)
- AtI[4] = BUILD_ORI(12, 12, To); // ori r12, r12, lo16(address)
- AtI[5] = BUILD_MTCTR(12); // mtctr r12
- AtI[6] = BUILD_BCTR(isCall); // bctr/bctrl
-+ AtI[0] = BUILD_LIS(12, To >> 48); // lis r12, hi16(address)
- }
- }
-
- extern "C" void PPC32CompilationCallback();
- extern "C" void PPC64CompilationCallback();
-
-+
- #if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)) && \
- !defined(__ppc64__)
- // CompilationCallback stub - We can't use a C function with inline assembly in
-@@ -144,6 +151,9 @@
- // it, because we the prolog/epilog inserted by GCC won't work for us. Instead,
- // write our own wrapper, which does things our way, so we have complete control
- // over register saving and restoring.
-+
-+# define CFI(x) x
-+
- asm(
- ".text\n"
- ".align 2\n"
-@@ -156,19 +166,29 @@
- // FIXME Layout
- // 8 double registers - 64 bytes
- // 8 int registers - 32 bytes
-+ CFI(".cfi_startproc\n")
-+ "stwu 1, -104(1)\n"
-+ CFI(".cfi_adjust_cfa_offset 104\n")
- "mflr 0\n"
-- "stw 0, 4(1)\n"
-- "stwu 1, -104(1)\n"
-+ "stw 0, 108(1)\n"
-+ CFI(".cfi_offset lr, 4\n")
- // Save all int arg registers
-- "stw 10, 100(1)\n" "stw 9, 96(1)\n"
-- "stw 8, 92(1)\n" "stw 7, 88(1)\n"
-- "stw 6, 84(1)\n" "stw 5, 80(1)\n"
-- "stw 4, 76(1)\n" "stw 3, 72(1)\n"
-+ "stw 10, 100(1)\n"
-+ "stw 9, 96(1)\n"
-+ "stw 8, 92(1)\n"
-+ "stw 7, 88(1)\n"
-+ "stw 6, 84(1)\n"
-+ "stw 5, 80(1)\n"
-+ "stw 4, 76(1)\n"
-+ "stw 3, 72(1)\n"
- // Save all call-clobbered FP regs.
- "stfd 8, 64(1)\n"
-- "stfd 7, 56(1)\n" "stfd 6, 48(1)\n"
-- "stfd 5, 40(1)\n" "stfd 4, 32(1)\n"
-- "stfd 3, 24(1)\n" "stfd 2, 16(1)\n"
-+ "stfd 7, 56(1)\n"
-+ "stfd 6, 48(1)\n"
-+ "stfd 5, 40(1)\n"
-+ "stfd 4, 32(1)\n"
-+ "stfd 3, 24(1)\n"
-+ "stfd 2, 16(1)\n"
- "stfd 1, 8(1)\n"
- // Arguments to Compilation Callback:
- // r3 - our lr (address of the call instruction in stub plus 4)
-@@ -181,21 +201,29 @@
- "bl PPCCompilationCallbackC\n"
- "mtctr 3\n"
- // Restore all int arg registers
-- "lwz 10, 100(1)\n" "lwz 9, 96(1)\n"
-- "lwz 8, 92(1)\n" "lwz 7, 88(1)\n"
-- "lwz 6, 84(1)\n" "lwz 5, 80(1)\n"
-- "lwz 4, 76(1)\n" "lwz 3, 72(1)\n"
-+ "lwz 10, 100(1)\n"
-+ "lwz 9, 96(1)\n"
-+ "lwz 8, 92(1)\n"
-+ "lwz 7, 88(1)\n"
-+ "lwz 6, 84(1)\n"
-+ "lwz 5, 80(1)\n"
-+ "lwz 4, 76(1)\n"
-+ "lwz 3, 72(1)\n"
- // Restore all FP arg registers
- "lfd 8, 64(1)\n"
-- "lfd 7, 56(1)\n" "lfd 6, 48(1)\n"
-- "lfd 5, 40(1)\n" "lfd 4, 32(1)\n"
-- "lfd 3, 24(1)\n" "lfd 2, 16(1)\n"
-+ "lfd 7, 56(1)\n"
-+ "lfd 6, 48(1)\n"
-+ "lfd 5, 40(1)\n"
-+ "lfd 4, 32(1)\n"
-+ "lfd 3, 24(1)\n"
-+ "lfd 2, 16(1)\n"
- "lfd 1, 8(1)\n"
- // Pop 3 frames off the stack and branch to target
- "lwz 1, 104(1)\n"
- "lwz 0, 4(1)\n"
- "mtlr 0\n"
- "bctr\n"
-+ CFI(".cfi_endproc\n")
- );
- #else
- void PPC32CompilationCallback() {
-@@ -325,6 +353,31 @@
- return is64Bit ? PPC64CompilationCallback : PPC32CompilationCallback;
- }
-
-+static const char* GetCommonFrame32() {
-+ /*
-+ // Size of common frame
-+ MCE.emitWordBE(16);
-+ // Common frame
-+ MCE.emitWordBE(0);
-+ MCE.emitByte(1);
-+ MCE.emitByte('z');
-+ MCE.emitByte('R');
-+ MCE.emitByte(0);
-+ MCE.emitByte(1);
-+ MCE.emitByte(-4 & 0x7f);
-+ MCE.emitByte(0x41);
-+ MCE.emitByte(1);
-+ MCE.emitByte(16);
-+ MCE.emitByte(0xc);
-+ MCE.emitByte(1);
-+ MCE.emitByte(0);*/
-+ static const char CF[] = {
-+ 0, 0, 0, 16, 0, 0, 0, 0, 1, 'z', 'R', 0, 1, -4 & 0x7f,
-+ 0x41, 1, 16, 0xc, 1, 0
-+ };
-+ return CF;
-+}
-+
- #if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)) && \
- defined(__APPLE__)
- extern "C" void sys_icache_invalidate(const void *Addr, size_t len);
-@@ -358,21 +411,26 @@
- SyncICache((void*)Addr, 7*4);
- return MCE.finishFunctionStub(F);
- }
--
-- MCE.startFunctionStub(F, 10*4);
-+
-+ if (ExceptionHandling && !is64Bit) {
-+ MCE.startFunctionStub(F, 10*4 + 44);
-+ } else {
-+ MCE.startFunctionStub(F, 10*4);
-+ }
-+
- intptr_t Addr = (intptr_t)MCE.getCurrentPCValue();
- if (is64Bit) {
-+ MCE.emitWordBE(0x7d6802a6); // mflr r11
-+ MCE.emitWordBE(0xf9610010); // std r11, 16(r1)
- MCE.emitWordBE(0xf821ffb1); // stdu r1,-80(r1)
-+ } else if (TM.getSubtargetImpl()->isMachoABI()){
- MCE.emitWordBE(0x7d6802a6); // mflr r11
-- MCE.emitWordBE(0xf9610060); // std r11, 96(r1)
-- } else if (TM.getSubtargetImpl()->isMachoABI()){
-+ MCE.emitWordBE(0x91610008); // stw r11, 8(r1)
- MCE.emitWordBE(0x9421ffe0); // stwu r1,-32(r1)
-+ } else {
- MCE.emitWordBE(0x7d6802a6); // mflr r11
-- MCE.emitWordBE(0x91610028); // stw r11, 40(r1)
-- } else {
-+ MCE.emitWordBE(0x91610004); // stw r11, 4(r1)
- MCE.emitWordBE(0x9421ffe0); // stwu r1,-32(r1)
-- MCE.emitWordBE(0x7d6802a6); // mflr r11
-- MCE.emitWordBE(0x91610024); // stw r11, 36(r1)
- }
- intptr_t BranchAddr = (intptr_t)MCE.getCurrentPCValue();
- MCE.emitWordBE(0);
-@@ -384,6 +442,42 @@
- MCE.emitWordBE(0);
- EmitBranchToAt(BranchAddr, (intptr_t)Fn, true, is64Bit);
- SyncICache((void*)Addr, 10*4);
-+ intptr_t EndAddr = (intptr_t)MCE.getCurrentPCValue();
-+
-+ if (ExceptionHandling && !is64Bit) {
-+ // Size of Eh section
-+ MCE.emitWordBE(32);
-+ // Eh section
-+ MCE.emitWordBE(MCE.getCurrentPCValue() - (intptr_t)GetCommonFrame32());
-+ MCE.emitWordBE(Addr - MCE.getCurrentPCValue());
-+ MCE.emitWordBE(EndAddr - Addr);
-+ MCE.emitByte(0);
-+ MCE.emitByte(dwarf::DW_CFA_advance_loc4);
-+ MCE.emitWordBE(8);
-+ MCE.emitByte(dwarf::DW_CFA_def_cfa_offset);
-+ MCE.emitByte(32);
-+ MCE.emitByte(dwarf::DW_CFA_offset_extended_sf);
-+ MCE.emitByte(TM.getRegisterInfo()->getDwarfRegNum(PPC::LR, true));
-+ if (TM.getSubtargetImpl()->isMachoABI()){
-+ MCE.emitByte(-2 & 0x7f);
-+ } else {
-+ MCE.emitByte(-1 & 0x7f);
-+ }
-+ MCE.emitByte(dwarf::DW_CFA_advance_loc4);
-+ MCE.emitWordBE(4);
-+ MCE.emitByte(dwarf::DW_CFA_def_cfa_register);
-+ MCE.emitByte(1);
-+ // Alignment
-+ MCE.emitByte(0);
-+ MCE.emitByte(0);
-+
-+ // Two zero for the unwind runtime
-+ MCE.emitWordBE(0);
-+ MCE.emitWordBE(0);
-+
-+ SyncICache((void*)EndAddr, 44);
-+ ExecutionEngine::RegisterTable((void*)EndAddr);
-+ }
- return MCE.finishFunctionStub(F);
- }
-
-Index: PPCISelLowering.cpp
-===================================================================
---- PPCISelLowering.cpp (revision 50006)
-+++ PPCISelLowering.cpp (working copy)
-@@ -175,10 +175,12 @@
- // We want to legalize GlobalAddress and ConstantPool nodes into the
- // appropriate instructions to materialize the address.
- setOperationAction(ISD::GlobalAddress, MVT::i32, Custom);
-+ setOperationAction(ISD::ExternalSymbol , MVT::i32 , Custom);
- setOperationAction(ISD::GlobalTLSAddress, MVT::i32, Custom);
- setOperationAction(ISD::ConstantPool, MVT::i32, Custom);
- setOperationAction(ISD::JumpTable, MVT::i32, Custom);
- setOperationAction(ISD::GlobalAddress, MVT::i64, Custom);
-+ setOperationAction(ISD::ExternalSymbol , MVT::i64 , Custom);
- setOperationAction(ISD::GlobalTLSAddress, MVT::i64, Custom);
- setOperationAction(ISD::ConstantPool, MVT::i64, Custom);
- setOperationAction(ISD::JumpTable, MVT::i64, Custom);
-@@ -745,6 +747,36 @@
- return isIntS16Immediate(Op.Val, Imm);
- }
-
-+ static SDOperand LowerExternalSymbol(SDOperand Op, SelectionDAG &DAG) {
-+ MVT::ValueType PtrVT = Op.getValueType();
-+ ExternalSymbolSDNode *GSDB = dyn_cast<ExternalSymbolSDNode>(Op);
-+ SDOperand GA = DAG.getTargetExternalSymbol(GSDB->getSymbol(), PtrVT);
-+ SDOperand Zero = DAG.getConstant(0, PtrVT);
-+
-+ const TargetMachine &TM = DAG.getTarget();
-+
-+ SDOperand Hi = DAG.getNode(PPCISD::Hi, PtrVT, GA, Zero);
-+ SDOperand Lo = DAG.getNode(PPCISD::Lo, PtrVT, GA, Zero);
-+
-+ // If this is a non-darwin platform, we don't support non-static relo models
-+ // yet.
-+ if (TM.getRelocationModel() == Reloc::Static ||
-+ !TM.getSubtarget<PPCSubtarget>().isDarwin()) {
-+ // Generate non-pic code that has direct accesses to globals.
-+ // The address of the global is just (hi(&g)+lo(&g)).
-+ return DAG.getNode(ISD::ADD, PtrVT, Hi, Lo);
-+ }
-+
-+ if (TM.getRelocationModel() == Reloc::PIC_) {
-+ // With PIC, the first instruction is actually "GR+hi(&G)".
-+ Hi = DAG.getNode(ISD::ADD, PtrVT,
-+ DAG.getNode(PPCISD::GlobalBaseReg, PtrVT), Hi);
-+ }
-+
-+ Lo = DAG.getNode(ISD::ADD, PtrVT, Hi, Lo);
-+
-+ return Lo;
-+ }
-
- /// SelectAddressRegReg - Given the specified addressed, check to see if it
- /// can be represented as an indexed [r+r] operation. Returns false if it
-@@ -2130,11 +2162,11 @@
- // If the callee is a GlobalAddress/ExternalSymbol node (quite common, every
- // direct call is) turn it into a TargetGlobalAddress/TargetExternalSymbol
- // node so that legalize doesn't hack it.
-- if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee))
-- Callee = DAG.getTargetGlobalAddress(G->getGlobal(), Callee.getValueType());
-- else if (ExternalSymbolSDNode *S = dyn_cast<ExternalSymbolSDNode>(Callee))
-- Callee = DAG.getTargetExternalSymbol(S->getSymbol(), Callee.getValueType());
-- else if (SDNode *Dest = isBLACompatibleAddress(Callee, DAG))
-+ //if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee))
-+ // Callee = DAG.getTargetGlobalAddress(G->getGlobal(), Callee.getValueType());
-+ //if (ExternalSymbolSDNode *S = dyn_cast<ExternalSymbolSDNode>(Callee))
-+ // Callee = DAG.getTargetExternalSymbol(S->getSymbol(), Callee.getValueType());
-+ if (SDNode *Dest = isBLACompatibleAddress(Callee, DAG))
- // If this is an absolute destination address, use the munged value.
- Callee = SDOperand(Dest, 0);
- else {
-@@ -3506,6 +3538,7 @@
- default: assert(0 && "Wasn't expecting to be able to lower this!");
- case ISD::ConstantPool: return LowerConstantPool(Op, DAG);
- case ISD::GlobalAddress: return LowerGlobalAddress(Op, DAG);
-+ case ISD::ExternalSymbol: return LowerExternalSymbol(Op, DAG);
- case ISD::GlobalTLSAddress: return LowerGlobalTLSAddress(Op, DAG);
- case ISD::JumpTable: return LowerJumpTable(Op, DAG);
- case ISD::SETCC: return LowerSETCC(Op, DAG);
Removed: vmkit/trunk/vmkit-llvm-x86.patch
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/vmkit-llvm-x86.patch?rev=52707&view=auto
==============================================================================
--- vmkit/trunk/vmkit-llvm-x86.patch (original)
+++ vmkit/trunk/vmkit-llvm-x86.patch (removed)
@@ -1,37 +0,0 @@
-Index: X86Subtarget.cpp
-===================================================================
---- X86Subtarget.cpp (revision 50008)
-+++ X86Subtarget.cpp (working copy)
-@@ -127,7 +127,7 @@
- return;
-
- X86::GetCpuIDAndInfo(0x1, &EAX, &EBX, &ECX, &EDX);
--
-+#if 0
- if ((EDX >> 23) & 0x1) X86SSELevel = MMX;
- if ((EDX >> 25) & 0x1) X86SSELevel = SSE1;
- if ((EDX >> 26) & 0x1) X86SSELevel = SSE2;
-@@ -135,7 +135,9 @@
- if ((ECX >> 9) & 0x1) X86SSELevel = SSSE3;
- if ((ECX >> 19) & 0x1) X86SSELevel = SSE41;
- if ((ECX >> 20) & 0x1) X86SSELevel = SSE42;
--
-+#else
-+ X86SSELevel = MMX;
-+#endif
- if (memcmp(text.c, "GenuineIntel", 12) == 0 ||
- memcmp(text.c, "AuthenticAMD", 12) == 0) {
- X86::GetCpuIDAndInfo(0x80000001, &EAX, &EBX, &ECX, &EDX);
-Index: X86JITInfo.cpp
-===================================================================
---- X86JITInfo.cpp (revision 50008)
-+++ X86JITInfo.cpp (working copy)
-@@ -60,7 +60,7 @@
- // FIXME: Disable this until we really want to use it. Also, we will
- // need to add some workarounds for compilers, which support
- // only subset of these directives.
--# define CFI(x)
-+# define CFI(x) x
- #endif
-
- // Provide a wrapper for X86CompilationCallback2 that saves non-traditional
More information about the llvm-commits
mailing list