[kaffe] CVS kaffe (dalibor): Moved configure.in to configure.ac

Kaffe CVS cvs-commits at kaffe.org
Wed Mar 24 10:11:03 PST 2004


PatchSet 4567 
Date: 2004/03/24 18:07:14
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Moved configure.in to configure.ac

2004-03-24  Dalibor Topic <robilad at kaffe.org>

        * configure.in: Moved over to configure.ac.

        * Makefile.in,
        config/Makefile.in,
        config/config.h.in,
        include/Makefile.in,
        kaffe/Makefile.in,
        kaffe/jvmpi/Makefile.in,
        kaffe/kaffe/Makefile.in,
        kaffe/kaffeh/Makefile.in,
        kaffe/kaffevm/Makefile.in,
        kaffe/kaffevm/gcj/Makefile.in,
        kaffe/kaffevm/intrp/Makefile.in,
        kaffe/kaffevm/jit/Makefile.in,
        kaffe/kaffevm/jit3/Makefile.in,
        kaffe/kaffevm/systems/Makefile.in,
        kaffe/kaffevm/systems/beos-native/Makefile.in,
        kaffe/kaffevm/systems/oskit-pthreads/Makefile.in,
        kaffe/kaffevm/systems/unix-jthreads/Makefile.in,
        kaffe/kaffevm/systems/unix-pthreads/Makefile.in,
        kaffe/man/Makefile.in,
        kaffe/scripts/Makefile.in,
        kaffe/scripts/bat/Makefile.in,
        kaffe/scripts/compat/Makefile.in,
        kaffe/xprof/Makefile.in,
        libraries/Makefile.in,
        libraries/clib/Makefile.in,
        libraries/clib/awt/Makefile.in,
        libraries/clib/awt/X/Makefile.in,
        libraries/clib/awt/qt/Makefile.in,
        libraries/clib/io/Makefile.in,
        libraries/clib/management/Makefile.in,
        libraries/clib/math/Makefile.in,
        libraries/clib/native/Makefile.in,
        libraries/clib/net/Makefile.in,
        libraries/clib/nio/Makefile.in,
        libraries/clib/security/Makefile.in,
        libraries/clib/zip/Makefile.in,
        libraries/extensions/Makefile.in,
        libraries/extensions/comm/Makefile.in,
        libraries/extensions/comm/javalib/Makefile.in,
        libraries/extensions/microsoft/Makefile.in,
        libraries/extensions/microsoft/clib/Makefile.in,
        libraries/extensions/microsoft/javalib/Makefile.in,
        libraries/extensions/pjava/Makefile.in,
        libraries/extensions/pjava/javalib/Makefile.in,
        libraries/extensions/servlet/Makefile.in,
        libraries/extensions/servlet/javalib/Makefile.in,
        libraries/extensions/sound/Makefile.in,
        libraries/extensions/sound/alsa/Makefile.in,
        libraries/extensions/sound/common/Makefile.in,
        libraries/extensions/sound/esd/Makefile.in,
        libraries/javalib/Makefile.in,
        replace/Makefile.in,
        test/Makefile.in,
        test/internal/Makefile.in,
        test/regression/Makefile.in,
        test/regression/compile_time/Makefile.in,
        test/regression/compiler/Makefile.in,
        test/regression/run_time/Makefile.in:
        Regenerated.

Members: 
	ChangeLog:1.2145->1.2146 
	Makefile.in:1.146->1.147 
	configure.ac:INITIAL->1.1 
	configure.in:1.262->1.263(DEAD) 
	config/Makefile.in:1.121->1.122 
	config/config.h.in:1.92->1.93 
	include/Makefile.in:1.146->1.147 
	kaffe/Makefile.in:1.104->1.105 
	kaffe/jvmpi/Makefile.in:1.26->1.27 
	kaffe/kaffe/Makefile.in:1.119->1.120 
	kaffe/kaffeh/Makefile.in:1.101->1.102 
	kaffe/kaffevm/Makefile.in:1.141->1.142 
	kaffe/kaffevm/gcj/Makefile.in:1.84->1.85 
	kaffe/kaffevm/intrp/Makefile.in:1.90->1.91 
	kaffe/kaffevm/jit/Makefile.in:1.96->1.97 
	kaffe/kaffevm/jit3/Makefile.in:1.66->1.67 
	kaffe/kaffevm/systems/Makefile.in:1.92->1.93 
	kaffe/kaffevm/systems/beos-native/Makefile.in:1.83->1.84 
	kaffe/kaffevm/systems/oskit-pthreads/Makefile.in:1.89->1.90 
	kaffe/kaffevm/systems/unix-jthreads/Makefile.in:1.92->1.93 
	kaffe/kaffevm/systems/unix-pthreads/Makefile.in:1.62->1.63 
	kaffe/man/Makefile.in:1.90->1.91 
	kaffe/scripts/Makefile.in:1.127->1.128 
	kaffe/scripts/bat/Makefile.in:1.83->1.84 
	kaffe/scripts/compat/Makefile.in:1.108->1.109 
	kaffe/xprof/Makefile.in:1.58->1.59 
	libraries/Makefile.in:1.87->1.88 
	libraries/clib/Makefile.in:1.95->1.96 
	libraries/clib/awt/Makefile.in:1.100->1.101 
	libraries/clib/awt/X/Makefile.in:1.90->1.91 
	libraries/clib/awt/qt/Makefile.in:1.45->1.46 
	libraries/clib/io/Makefile.in:1.93->1.94 
	libraries/clib/management/Makefile.in:1.102->1.103 
	libraries/clib/math/Makefile.in:1.98->1.99 
	libraries/clib/native/Makefile.in:1.125->1.126 
	libraries/clib/net/Makefile.in:1.106->1.107 
	libraries/clib/nio/Makefile.in:1.20->1.21 
	libraries/clib/security/Makefile.in:1.66->1.67 
	libraries/clib/zip/Makefile.in:1.100->1.101 
	libraries/extensions/Makefile.in:1.78->1.79 
	libraries/extensions/comm/Makefile.in:1.73->1.74 
	libraries/extensions/comm/javalib/Makefile.in:1.73->1.74 
	libraries/extensions/microsoft/Makefile.in:1.65->1.66 
	libraries/extensions/microsoft/clib/Makefile.in:1.68->1.69 
	libraries/extensions/microsoft/javalib/Makefile.in:1.66->1.67 
	libraries/extensions/pjava/Makefile.in:1.73->1.74 
	libraries/extensions/pjava/javalib/Makefile.in:1.73->1.74 
	libraries/extensions/servlet/Makefile.in:1.73->1.74 
	libraries/extensions/servlet/javalib/Makefile.in:1.73->1.74 
	libraries/extensions/sound/Makefile.in:1.41->1.42 
	libraries/extensions/sound/alsa/Makefile.in:1.43->1.44 
	libraries/extensions/sound/common/Makefile.in:1.43->1.44 
	libraries/extensions/sound/esd/Makefile.in:1.43->1.44 
	libraries/javalib/Makefile.in:1.237->1.238 
	replace/Makefile.in:1.38->1.39 
	test/Makefile.in:1.93->1.94 
	test/internal/Makefile.in:1.51->1.52 
	test/regression/Makefile.in:1.162->1.163 
	test/regression/compile_time/Makefile.in:1.23->1.24 
	test/regression/compiler/Makefile.in:1.5->1.6 
	test/regression/run_time/Makefile.in:1.22->1.23 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2145 kaffe/ChangeLog:1.2146
--- kaffe/ChangeLog:1.2145	Wed Mar 24 17:27:35 2004
+++ kaffe/ChangeLog	Wed Mar 24 18:07:14 2004
@@ -1,6 +1,70 @@
 2004-03-24  Dalibor Topic <robilad at kaffe.org>
 
-        m4/ax_cflags_gcc_option.m4,
+	* configure.in: Moved over to configure.ac.
+
+        * Makefile.in,
+        config/Makefile.in,
+        config/config.h.in,
+        include/Makefile.in,
+        kaffe/Makefile.in,
+        kaffe/jvmpi/Makefile.in,
+        kaffe/kaffe/Makefile.in,
+        kaffe/kaffeh/Makefile.in,
+        kaffe/kaffevm/Makefile.in,
+        kaffe/kaffevm/gcj/Makefile.in,
+        kaffe/kaffevm/intrp/Makefile.in,
+        kaffe/kaffevm/jit/Makefile.in,
+        kaffe/kaffevm/jit3/Makefile.in,
+        kaffe/kaffevm/systems/Makefile.in,
+        kaffe/kaffevm/systems/beos-native/Makefile.in,
+        kaffe/kaffevm/systems/oskit-pthreads/Makefile.in,
+        kaffe/kaffevm/systems/unix-jthreads/Makefile.in,
+        kaffe/kaffevm/systems/unix-pthreads/Makefile.in,
+        kaffe/man/Makefile.in,
+        kaffe/scripts/Makefile.in,
+        kaffe/scripts/bat/Makefile.in,
+        kaffe/scripts/compat/Makefile.in,
+        kaffe/xprof/Makefile.in,
+        libraries/Makefile.in,
+        libraries/clib/Makefile.in,
+        libraries/clib/awt/Makefile.in,
+        libraries/clib/awt/X/Makefile.in,
+        libraries/clib/awt/qt/Makefile.in,
+        libraries/clib/io/Makefile.in,
+        libraries/clib/management/Makefile.in,
+        libraries/clib/math/Makefile.in,
+        libraries/clib/native/Makefile.in,
+        libraries/clib/net/Makefile.in,
+        libraries/clib/nio/Makefile.in,
+        libraries/clib/security/Makefile.in,
+        libraries/clib/zip/Makefile.in,
+        libraries/extensions/Makefile.in,
+        libraries/extensions/comm/Makefile.in,
+        libraries/extensions/comm/javalib/Makefile.in,
+        libraries/extensions/microsoft/Makefile.in,
+        libraries/extensions/microsoft/clib/Makefile.in,
+        libraries/extensions/microsoft/javalib/Makefile.in,
+        libraries/extensions/pjava/Makefile.in,
+        libraries/extensions/pjava/javalib/Makefile.in,
+        libraries/extensions/servlet/Makefile.in,
+        libraries/extensions/servlet/javalib/Makefile.in,
+        libraries/extensions/sound/Makefile.in,
+        libraries/extensions/sound/alsa/Makefile.in,
+        libraries/extensions/sound/common/Makefile.in,
+        libraries/extensions/sound/esd/Makefile.in,
+        libraries/javalib/Makefile.in,
+        replace/Makefile.in,
+        test/Makefile.in,
+        test/internal/Makefile.in,
+        test/regression/Makefile.in,
+        test/regression/compile_time/Makefile.in,
+        test/regression/compiler/Makefile.in,
+        test/regression/run_time/Makefile.in:
+	Regenerated.
+
+2004-03-24  Dalibor Topic <robilad at kaffe.org>
+
+        * m4/ax_cflags_gcc_option.m4,
         m4/ax_cflags_warn_all.m4:
 	New files from AC-Archive. Licensed under GPL+special exception.
 
Index: kaffe/Makefile.in
diff -u kaffe/Makefile.in:1.146 kaffe/Makefile.in:1.147
--- kaffe/Makefile.in:1.146	Wed Mar 24 17:27:36 2004
+++ kaffe/Makefile.in	Wed Mar 24 18:07:15 2004
@@ -66,7 +66,7 @@
 	$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
 	$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/sockaddrin6.m4 \
 	$(top_srcdir)/m4/sockinttypes.m4 $(top_srcdir)/m4/valist.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
===================================================================
Checking out kaffe/configure.ac
RCS:  /home/cvs/kaffe/kaffe/configure.ac,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/configure.ac	Wed Mar 24 18:10:53 2004
@@ -0,0 +1,1911 @@
+AC_INIT([Kaffe Virtual Machine],[1.1.x-cvs],[kaffe at kaffe.org],[kaffe])
+
+AC_PREREQ(2.59)
+
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([scripts])
+AC_CONFIG_SRCDIR([kaffe])
+
+# Copyright information. The nice sounding paragraphs about
+# GPLed portions has been taken from the GPL-d configure.ac
+# file of gimp-print project
+
+AC_COPYRIGHT([Copyright 1996 - 2004 Kaffe.org project contributors. All rights reserved.
+Portions Copyright 1996 - 2002 Transvirtual Technologies, Inc.
+Portions Copyright by various third parties, see file THIRDPARTY for details.
+
+This file is part of Kaffe Virtual Machine, a free software runtime
+for java applications. See http://www.kaffe.org for details.
+
+Parts of this configure script come from the `configure.in' file, and
+are not based on freely-redistributable m4 macros; you can redistribute
+them and/or modify them under the terms of the GNU General Public
+as published by the Free Software Foundation; either version 2, 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.
+])
+
+AM_INIT_AUTOMAKE(kaffe, 1.1.x-cvs)
+
+AC_PREFIX_DEFAULT(/usr/local/kaffe)
+
+AM_MAINTAINER_MODE
+
+dnl needed for autoheader to find acconfig.h
+AUTOHEADER="$AUTOHEADER --include=config"
+
+dnl abssrcdir is the absolute path to the source base (regardless of where
+dnl you are building it)
+case x$srcdir in
+x/*)
+	abssrcdir=$srcdir
+	;;
+*)
+	abssrcdir=`pwd`/$srcdir
+	;;
+esac
+AC_SUBST(abssrcdir)
+
+dnl =========================================================================
+dnl Allow specification of header-file and library directories
+dnl -------------------------------------------------------------------------
+
+AC_ARG_WITH([includes],
+  	    AS_HELP_STRING([--with-includes=dirs],
+			   [Search specified directories for header files]),
+  [ CPPFLAGS="$CPPFLAGS"`echo " $withval" |
+	sed -e 's/ / -I/g' -e 's/-I //g' -e 's/-I$//'` ],
+  [ CPPFLAGS="$CPPFLAGS" ])
+
+AC_ARG_WITH([libraries],
+	    AS_HELP_STRING([--with-libraries=dirs],
+			   [Search for libraries in specified directories]),
+  [ CTLIBS="$CTLIBS"`echo " $withval" |
+	sed -e 's/ / -L/g' -e 's/-L //g' -e 's/-L$//'`
+    LTLIBS="$LTLIBS"`echo " $withval" |
+	sed -e 's/ / -R/g' -e 's/-R //g' -e 's/-R$//'`],
+  [ CTLIBS="$CTLIBS"
+    LTLIBS="$LTLIBS"])
+
+LIBS="$CTLIBS $LIBS"
+
+dnl Find the compiler early on in case we need to override.
+AC_PROG_CC
+
+dnl If gcc is the compiler, compile with -Wall for lots of warnings
+
+# turn on -Wall
+AX_CFLAGS_WARN_ALL
+
+# turn on all other gcc warnings for more fixing fun
+
+AX_CFLAGS_GCC_OPTION([-W])
+AX_CFLAGS_GCC_OPTION([Wfloat-equal])
+AX_CFLAGS_GCC_OPTION([-Wtraditional])
+AX_CFLAGS_GCC_OPTION([-Wundef])
+AX_CFLAGS_GCC_OPTION([-Wendif-labels])
+AX_CFLAGS_GCC_OPTION([-Wshadow])
+AX_CFLAGS_GCC_OPTION([-Wpointer-arith])
+AX_CFLAGS_GCC_OPTION([-Wbad-function-cast])
+AX_CFLAGS_GCC_OPTION([-Wcast-qual])
+AX_CFLAGS_GCC_OPTION([-Wcast-align])
+AX_CFLAGS_GCC_OPTION([-Wwrite-strings]) 
+AX_CFLAGS_GCC_OPTION([-Wconversion])
+AX_CFLAGS_GCC_OPTION([-Wsign-compare]) 
+AX_CFLAGS_GCC_OPTION([-Waggregate-return]) 
+AX_CFLAGS_GCC_OPTION([-Wstrict-prototypes])
+AX_CFLAGS_GCC_OPTION([-Wmissing-prototypes])
+AX_CFLAGS_GCC_OPTION([-Wmissing-declarations])
+AX_CFLAGS_GCC_OPTION([-Wmissing-noreturn])
+AX_CFLAGS_GCC_OPTION([-Wmissing-format-attribute]) 
+AX_CFLAGS_GCC_OPTION([-Wpacked])
+AX_CFLAGS_GCC_OPTION([-Wpadded])
+AX_CFLAGS_GCC_OPTION([-Wredundant-decls])
+AX_CFLAGS_GCC_OPTION([-Wnested-externs])
+AX_CFLAGS_GCC_OPTION([-Wunreachable-code])
+AX_CFLAGS_GCC_OPTION([-Winline])
+AX_CFLAGS_GCC_OPTION([-Wlong-long])
+AX_CFLAGS_GCC_OPTION([-Wdisabled-optimization])
+
+if test "$GCC" != "yes"; then
+	AC_MSG_ERROR([Kaffe can only build with GCC])
+fi
+
+dnl Find the c++ compiler early on
+AC_PROG_CXX
+
+dnl Find the machine type and setup the relevant links
+AC_CANONICAL_HOST
+AC_EXEEXT
+
+dnl =========================================================================
+dnl By default we use dynamic libraries for everything
+dnl -------------------------------------------------------------------------
+
+dynamic_libraries=yes
+vm_dynamic_library=yes
+vm_dynamic_binary=yes
+
+dnl -------------------------------------------------------------------------
+
+dnl =========================================================================
+dnl Force use of static libraries
+dnl -------------------------------------------------------------------------
+
+AC_ARG_WITH([staticlib],
+            AS_HELP_STRING([--with-staticlib],
+                           [Force the use of static libraries rather than shared]))
+
+if test x"$with_staticlib" = x"yes" ; then
+	dynamic_libraries=no
+	if test x"${with_staticvm+set}" != x"set"; then
+		with_staticvm=yes
+	fi
+fi
+
+AC_ARG_WITH([staticbin],
+            AS_HELP_STRING([--with-staticbin],
+                           [Force the creation of a static virtual machine binary]))
+
+if test x"$with_staticbin" = x"yes" ; then
+	vm_dynamic_binary=no
+	if test x"${with_staticvm+set}" != x"set"; then
+		with_staticvm=yes
+	fi
+fi
+
+AC_ARG_WITH([staticvm],
+            AS_HELP_STRING([--with-staticvm],
+                           [Force the creation of a static virtual machine]))
+
+if test x"$with_staticvm" = x"yes" ; then
+	vm_dynamic_library=no
+fi
+
+dnl If the vm is static or all libraries are static then make sure we set
+dnl the no-share-vmlibrary flag.
+if test x"$vm_dynamic_library" = x"no" || test x"$dynamic_libraries" = x"no"; then
+	AC_DEFINE(NO_SHARED_VMLIBRARY, 1, [If the vm is static or all libraries are static])
+fi
+
+dnl =========================================================================
+dnl Look for the configuration information
+dnl -------------------------------------------------------------------------
+
+known=no
+Khost_cpu=$host_cpu
+Khost_os=$host_os
+if test -f $srcdir/config/config.alias ; then
+	. $srcdir/config/config.alias
+fi
+if test -f $srcdir/config/$Khost_cpu/$Khost_os/config.frag ; then
+	known=yes
+	. $srcdir/config/$Khost_cpu/$Khost_os/config.frag
+fi
+if test x"$known" = x"no" ; then
+	AC_MSG_ERROR(Configuration $Khost_cpu-$Khost_os not supported)
+fi
+
+dnl =========================================================================
+
+dnl =========================================================================
+dnl Configure libtool
+dnl -------------------------------------------------------------------------
+
+case "$dynamic_libraries,$vm_dynamic_library" in
+no,no) : ${enable_shared=no};;
+yes,yes) : ${enable_static=no};;
+# otherwise, we have to compile everything twice
+esac
+
+AC_LIBTOOL_DLOPEN
+AC_LIBLTDL_CONVENIENCE
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+AC_SUBST(LIBTOOL_DEPS)
+AC_SUBST(LIBLTDL)
+## Let users override the linker used by libtool, but default to $CC.
+CCLD=${CCLD:-'$(CC)'}
+AC_SUBST(CCLD)
+
+# ===========================================================================
+# Configure gettext (needed for libiconv scripts)
+# ===========================================================================
+
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION(0.14.1)
+
+dnl =========================================================================
+dnl Do we need underscore?
+dnl -------------------------------------------------------------------------
+
+AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+AC_LTDL_SYMBOL_USCORE
+
+if test x"$ac_cv_sys_symbol_underscore" = x"yes"; then
+    AC_DEFINE(HAVE_UNDERSCORED_C_NAMES, 1, [Define if C symbol names start with underscore])
+fi
+
+dnl =========================================================================
+dnl Start of default configurations
+dnl -------------------------------------------------------------------------
+
+dnl What kind of system are we using?
+NOSIGCONTEXT=false
+
+case $Khost_os in
+win32*)
+	SYSTEM=win32 ;;
+cygwin*)
+	SYSTEM=unix;
+	NOSIGCONTEXT=true;;
+*)
+	SYSTEM=unix ;;
+esac
+
+dnl -------------------------------------------------------------------------
+dnl End of default configurations
+dnl =========================================================================
+
+dnl =========================================================================
+dnl This is a hack to ease the generation of forward-sources, i.e.,
+dnl sources that just #include others, because automake can't use
+dnl sources from other directories
+dnl -------------------------------------------------------------------------
+
+AC_SUBST(REGEN_FORWARD)
+REGEN_FORWARD="\$(top_srcdir)/config/regen-forward"
+
+dnl =========================================================================
+dnl Set the base set of platform-dependent files 
+dnl One-liners with #include directives will be created in the Makefiles
+dnl -------------------------------------------------------------------------
+
+CONFIG_MD_H="\$(srcdir)/$Khost_cpu/$Khost_os/md.h"
+CONFIG_CALLKAFFEEXCEPTION_H="\$(top_srcdir)/config/$Khost_cpu/callKaffeException.h"
+KAFFEVM_MD_C="\$(top_srcdir)/config/$Khost_cpu/$Khost_os/md.c"
+AC_SUBST(CONFIG_MD_H)
+AC_SUBST(CONFIG_CALLKAFFEEXCEPTION_H)
+AC_SUBST(KAFFEVM_MD_C)
+
+dnl =========================================================================
+
+dnl =========================================================================
+dnl Look for configuration specific Makefile fragement and include it
+dnl -------------------------------------------------------------------------
+
+if test -f $srcdir/config/$Khost_cpu/$Khost_os/Make.frag ; then
+	cpu_os_frag=$srcdir/config/$Khost_cpu/$Khost_os/Make.frag
+else
+	cpu_os_frag=/dev/null
+fi
+if test -f $srcdir/config/$Khost_cpu/Make.frag ; then
+	cpu_frag=$srcdir/config/$Khost_cpu/Make.frag
+else
+	cpu_frag=/dev/null
+fi
+AC_SUBST_FILE(cpu_os_frag)dnl
+AC_SUBST_FILE(cpu_frag)dnl
+
+dnl =========================================================================
+
+dnl =========================================================================
+dnl Allow selection of a specific execution engine
+dnl -------------------------------------------------------------------------
+
+AC_ARG_WITH([engine],
+	    AS_HELP_STRING([--with-engine=ENGINE],
+			   [Force use given execution engine (intrp, jit, or jit3)]))
+
+dnl Translate 'interpreter' to 'intrp'
+if test x"$with_engine" = x"interpreter" ; then
+	with_engine=intrp
+fi
+
+dnl Save the requested engine and set the default to 'jit'
+want_engine="$with_engine"
+if test x"${with_engine+set}" != x"set" ; then
+	with_engine="jit"
+fi
+
+dnl =========================================================================
+
+dnl -------------------------------------------------------------------------
+dnl Check for JIT support and add in the necessary configuration files
+dnl -------------------------------------------------------------------------
+
+dnl AC_KAFFE_IF_SUPPORTED_ENGINE(ENGINE, SUP_CMDS, UPDATE_CMDS, UNSUP_CMDS)
+dnl If the engine is fully supported, run SUP_CMDS.
+dnl If it needs updating, run UPDATE_CMDS.
+dnl If it is not supported at all, run UNSUP_CMDS.
+AC_DEFUN([AC_KAFFE_IF_SUPPORTED_ENGINE], [
+  if test x"$1" = x"intrp"; then
+    ifelse([$2],[],[:],[$2])
+  else
+    if test -f "$srcdir/config/$Khost_cpu/$1-$Khost_cpu.def" && test -f "$srcdir/config/$Khost_cpu/$Khost_os/$1-md.h"; then
+      if sed 1q < "$srcdir/config/$Khost_cpu/$Khost_os/$1-md.h" |
+	 fgrep "Needs update, do not use" > /dev/null; then
+	ifelse([$3],[],[:],[$3])
+      else
+	ifelse([$2],[],[:],[$2])
+      fi
+    else
+      ifelse([$4],[],[:],[$4])
+    fi
+  fi
+])
+
+dnl If they request a specific engine, we must support it or else fail
+dnl Otherwise, pick the most preferable supported engine. Note that
+dnl the "intrp" engine is always supported, so we can't fail there.
+
+if test x"${want_engine}" != x""; then
+	AC_KAFFE_IF_SUPPORTED_ENGINE([${want_engine}],,
+		[AC_MSG_WARN([The $want_engine engine was not updated for $Khost_cpu-$Khost_os])], 
+		[AC_MSG_ERROR([Configuration $Khost_cpu-$Khost_os does not support the $want_engine engine])])
+	with_engine="${want_engine}"
+else
+	for engine in jit3 jit intrp; do
+		AC_KAFFE_IF_SUPPORTED_ENGINE([${engine}], [
+			with_engine="${engine}"
+			break;
+		])
+	done
+fi
+
+if test x"$with_engine" != x"intrp" ; then
+    HAVE_CONFIG_JIT_MD_H=1
+    CONFIG_JIT_MD_H="\$(top_srcdir)/config/$Khost_cpu/$Khost_os/$with_engine-md.h"
+    AC_SUBST(CONFIG_JIT_MD_H)
+    KAFFEVM_JIT_DEF="\$(top_srcdir)/config/$Khost_cpu/$with_engine-$Khost_cpu.def"
+    AC_SUBST(KAFFEVM_JIT_DEF)
+    KAFFEVM_ICODE_H="\$(top_srcdir)/config/$Khost_cpu/$with_engine-icode.h"
+    AC_SUBST(KAFFEVM_ICODE_H)
+else
+    HAVE_CONFIG_JIT_MD_H=0
+fi
+
+AC_SUBST(HAVE_CONFIG_JIT_MD_H)
+
+AC_MSG_CHECKING(execution engine)
+AC_MSG_RESULT($with_engine)
+AM_CONDITIONAL(USE_JIT, test x"$with_engine" != x"intrp")
+
+ENGINE_NAME="$with_engine"
+AC_SUBST(ENGINE_NAME)
+
+AC_SUBST_FILE(engine_frag)dnl
+engine_frag=$srcdir/kaffe/kaffevm/$with_engine/Makefile.frag
+
+dnl =========================================================================
+dnl Allow selection of debugging mechanisms
+dnl -------------------------------------------------------------------------
+
+AC_ARG_ENABLE([debug],
+	      AS_HELP_STRING([--enable-debug],
+			     [Enable run-time debugging machinery @<:@default=yes@:>@]))
+
+case "$enable_debug" in
+no) CPPFLAGS="$CPPFLAGS -DNDEBUG";;
+*) CPPFLAGS="$CPPFLAGS -DKAFFE_VMDEBUG";;
+esac
+
+dnl =========================================================================
+dnl Allow user to specify a bcel.jar file for class file testing.
+dnl -------------------------------------------------------------------------
+
+AC_ARG_WITH([bcel],
+              AS_HELP_STRING([--with-bcel=<jar>],
+			     [Use the specified Bytecode Engineering Jar file.]),
+  [ BCEL_JAR="$withval" ],
+  [ BCEL_JAR="" ])
+
+AC_SUBST(BCEL_JAR)
+AM_CONDITIONAL(HAVE_BCEL, test x"$BCEL_JAR" != x"")
+
+dnl =========================================================================
+dnl Allow activation of jvmpi
+dnl -------------------------------------------------------------------------
+
+AC_ARG_ENABLE([jvmpi],
+              AS_HELP_STRING([--enable-jvmpi],
+                             [Enable JVMPI @<:@default=no@:>@]))
+
+case "$enable_jvmpi" in
+"") ;;
+no) ;;
+*) if test "x$NOSIGCONTEXT" = "xtrue"; then
+	echo "JVMPI does not support Cygwin"
+   else
+	AC_DEFINE(ENABLE_JVMPI, 1, [JVM Profiling Interface])
+   fi;;
+esac
+
+AM_CONDITIONAL(ENABLE_JVMPI, test x"$enable_jvmpi" = x"yes")
+
+dnl =========================================================================
+dnl Allow user to specify a dnsjava.jar file for class file testing.
+dnl -------------------------------------------------------------------------
+
+AC_ARG_WITH([dnsjava],
+              AS_HELP_STRING([--with-dnsjava=<jar>],
+                             [Use the specified DNS java Jar file.]),
+  [ DNSJAVA_JAR="$withval" ],
+  [ DNSJAVA_JAR="" ])
+
+AC_SUBST(DNSJAVA_JAR)
+AM_CONDITIONAL(HAVE_DNSJAVA, test x"$DNSJAVA_JAR" != x"")
+
+dnl =========================================================================
+dnl Allow support for profiling of C/jitted code
+dnl -------------------------------------------------------------------------
+
+need_libxprof=no
+
+AC_ARG_ENABLE([xprofiling],
+              AS_HELP_STRING([--enable-xprofiling],
+                             [Enable profiling for C and jitted code]))
+
+if test "x$NOSIGCONTEXT" = "xtrue"; then
+  echo "XProfiling does not support Cygwin"
+  enable_xprofiling=no
+fi
+
+case "$enable_xprofiling" in
+"") xprofiling=no ;;
+no) xprofiling=no ;;
+*)  xprofiling=yes; need_libxprof=yes; CPPFLAGS="$CPPFLAGS -DKAFFE_XPROFILER";;
+esac
+dnl ENABLE_XPROF controls installation of xprof scripts in kaffe/scripts/Makefile.am
+AM_CONDITIONAL(ENABLE_XPROF, test x"$enable_xprofiling" = x"yes")
+
+if test x"$enable_xprofiling" = x"yes"; then
+  if test -f "$srcdir/config/$Khost_cpu/$Khost_os/xprofile-md.h"; then
+    CONFIG_XPROFILE_MD_H="\$(top_srcdir)/config/$Khost_cpu/$Khost_os/xprofile-md.h"
+    AC_SUBST(CONFIG_XPROFILE_MD_H)
+  else
+    AC_MSG_ERROR(Profiling not supported in $Khost_cpu-$Khost_os)
+  fi
+fi
+
+dnl =========================================================================
+dnl Allow support for debugging of C/jitted code
+dnl -------------------------------------------------------------------------
+
+AC_ARG_ENABLE([xdebugging],
+              AS_HELP_STRING([--enable-xdebugging],
+                             [Enable debugging symbol generation for jitted code]))
+
+case "$enable_xdebugging" in
+"") ;;
+no) ;;
+*) need_libxprof=yes; CPPFLAGS="$CPPFLAGS -DKAFFE_XDEBUGGING"; JAVAC_FLAGS="-g $JAVAC_FLAGS";;
+esac
+
+AC_SUBST(JAVAC_FLAGS)
+
+dnl =========================================================================
+dnl Allow generation feedback data
+dnl -------------------------------------------------------------------------
+
+AC_ARG_ENABLE([feedback],
+              AS_HELP_STRING([--enable-feedback],
+                             [Enable generation of feedback data]))
+
+case "$enable_feedback" in
+"") ;;
+no) ;;
+*) need_libxprof=yes; CPPFLAGS="$CPPFLAGS -DKAFFE_FEEDBACK";;
+esac
+
+AM_CONDITIONAL(NEED_LIBXPROF, test x"$need_libxprof" = x"yes")
+
+dnl =========================================================================
+dnl Allow enabling of profiling
+dnl -------------------------------------------------------------------------
+
+AC_ARG_WITH([profiling],
+              AS_HELP_STRING([--with-profiling],
+                             [Compile with gprof(1) profiling support]))
+
+AC_MSG_CHECKING(gprof(4) profiling support)
+if test x"${with_profiling}" = x"yes" ; then
+	CFLAGS="$CFLAGS -pg"
+	CPPFLAGS="$CPPFLAGS -DKAFFE_CPROFILER"
+else
+	with_profiling=no
+fi
+AC_MSG_RESULT($with_profiling)
+
+dnl =========================================================================
+dnl Do we include our Sun compatibility scripts?
+dnl -------------------------------------------------------------------------
+
+AC_ARG_WITH([suncompat],
+              AS_HELP_STRING([--without-suncompat],
+                             [Don't include Sun compatibility scripts]))
+
+AC_MSG_CHECKING(sun compatibility mode)
+if test x"${with_suncompat+set}" != x"set" ; then
+	with_suncompat=yes
+fi
+AM_CONDITIONAL(SUN_COMPAT, test x"$with_suncompat" = x"yes")
+AC_MSG_RESULT($with_suncompat)
+
+dnl =========================================================================
+dnl Use the new internal threading system "jthreads"
+dnl -------------------------------------------------------------------------
+
+AC_ARG_WITH([threads],
+              AS_HELP_STRING([--with-threads=SYSTEM],
+                             [Define which threading system to use @<:@default=unix-jthreads@:>@]))
+
+AC_MSG_CHECKING(thread system)
+if test x"$with_threads" = x"" ; then
+	with_threads=unix-jthreads
+fi
+if test ! -d $srcdir/kaffe/kaffevm/systems/${with_threads} ; then
+	AC_MSG_ERROR(Configuration $Khost_cpu-$Khost_os does not support $with_threads threads)
+fi
+THREAD_SYSTEM=$with_threads
+AC_MSG_RESULT($THREAD_SYSTEM)
+AC_SUBST_FILE(threads_frag)dnl
+threads_frag=$srcdir/kaffe/kaffevm/systems/$with_threads/Makefile.frag
+AC_SUBST(THREAD_DIR)
+THREAD_DIR=systems/$with_threads
+
+dnl =========================================================================
+dnl Use jikes instead of kjc?
+dnl =========================================================================
+
+AC_CHECK_PROG(JIKESPROG, jikes, jikes)
+AC_ARG_WITH([jikes],
+            AS_HELP_STRING([--with-jikes<=JIKES>],
+                           [Define to use jikes compiler @<:@default=no@:>@]),
+	[JIKES="$withval"],
+	[JIKES=""])
+
+AC_MSG_CHECKING([whether to use jikes])
+
+case $with_jikes in
+yes)
+	use_jikes="yes ($JIKES)"
+	JIKES=$JIKESPROG
+	;;
+no)
+	use_jikes="no"
+	JIKES=
+	;;
+*)
+	use_jikes="yes ($JIKES)"
+	JIKES="$with_jikes"
+	;;
+esac
+
+AC_MSG_RESULT($use_jikes)
+AC_SUBST(JIKES)
+
+dnl =========================================================================
+dnl Look for trampoline code if in JIT mode
+dnl -------------------------------------------------------------------------
+KAFFEVM_TRAMPOLINES_C=
+if test x"$with_engine" != x"intrp" ; then
+	AC_MSG_CHECKING(for trampolines)
+	if test -f $srcdir/config/$Khost_cpu/trampolines.c ; then
+		KAFFEVM_TRAMPOLINES_C="\$(top_srcdir)/config/$Khost_cpu/trampolines.c"
+		AC_SUBST(KAFFEVM_TRAMPOLINES_C)
+		AC_MSG_RESULT(yes)
+	else
+		AC_MSG_ERROR(does not support trampolines - now mandatory)
+	fi
+fi
+
+dnl =========================================================================
+dnl Set install root directory which prefixes all install target dirs
+dnl -------------------------------------------------------------------------
+
+if test x"$with_installroot" != x""; then
+    AC_MSG_ERROR([--with-installroot is deprecated, use `make install DESTDIR=...'])
+fi
+
+dnl =========================================================================
+
+dnl =========================================================================
+dnl Make the necessary substitutions
+dnl -------------------------------------------------------------------------
+
+AC_SUBST(JAVA_LIBS)
+AC_SUBST(with_engine)
+AC_SUBST(THREAD_SYSTEM)
+if test x"$program_prefix" = x"NONE" ; then
+	KPREFIX=""
+else
+	KPREFIX=$program_prefix
+fi
+AC_SUBST(KPREFIX)
+KAFFE_ARCHOS="$Khost_cpu-$Khost_os"
+AC_DEFINE_UNQUOTED(ARCHOS, "$KAFFE_ARCHOS", [Define the version we're compiling for])
+AC_SUBST(KAFFE_ARCHOS)
+
+dnl =========================================================================
+
+dnl =========================================================================
+dnl Checks for programs.
+dnl -------------------------------------------------------------------------
+
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+AC_CHECK_PROG(ZIP, zip, zip)
+AC_CHECK_PROG(MKTEMP, mktemp, mktemp)
+if test  x"$MKTEMP" = x"" ; then
+   AC_MSG_WARN([mktemp not found. You need mktemp to be able to debug kaffe.])
+fi
+AC_CHECK_PROG(JASMIN, jasmin, jasmin)
+
+AM_CONDITIONAL(HAVE_ZIP, test x"$ZIP" != x"")
+AM_CONDITIONAL(HAVE_JIKES, test x"$JIKES" != x"")
+AM_CONDITIONAL(HAVE_MKTEMP, test x"$MKTEMP" != x"")
+AM_CONDITIONAL(HAVE_JASMIN, test x"$JASMIN" != x"")
+
+dnl If symlink is overridden then don't bother with the test.
+if test x"$LN_S" = x"" ; then
+	AC_PROG_LN_S
+fi
+dnl This shell macro caches uses of ln -s in the generated script and
+dnl converts them to LN_S
+ln() {
+	if test x"$1" = x"-s" ; then
+		$LN_S $2 $3
+	else
+		ln $1 $2
+	fi
+}
+
+dnl Check for AWK. Used by kaffexprof
+AC_PROG_AWK
+
+dnl =========================================================================
+dnl Checks for types
+dnl -------------------------------------------------------------------------
+
+AC_CHECK_SIZEOF(short,0)
+AC_CHECK_SIZEOF(int,0)
+AC_CHECK_SIZEOF(long,0)
+AC_CHECK_SIZEOF(long long,0)
+AC_CHECK_SIZEOF(__int64,0)
+AC_CHECK_SIZEOF(void*,0)
+
+AC_TYPE_OFF_T
+AC_TYPE_PID_T
+
+dnl =========================================================================
+dnl Checks for alignments
+dnl -------------------------------------------------------------------------
+
+AC_CACHE_CHECK(alignment of void*, ac_cv_alignmentof_voidp,
+AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
+main() { struct { char c; void *p; } t; FILE *f;
+  if ((char*) &t.c != (char*) &t)  exit (1);
+  f=fopen ("conftestdata", "w");
+  if (! f)                         exit (1);
+  fprintf (f, "%d", ((char*) &t.p)-((char*) &t));
+  fclose(f); exit (0); }]])],[ac_cv_alignmentof_voidp=`cat conftestdata`],[AC_MSG_ERROR(Unexpected result)],[ac_cv_alignmentof_voidp=$ac_cv_sizeof_voidp]))
+AC_DEFINE_UNQUOTED(ALIGNMENTOF_VOIDP,$ac_cv_alignmentof_voidp, [How are pointers aligned])
+
+dnl -------------------------------------------------------------------------
+
+AC_TYPE_SIGNAL
+
+AC_CACHE_CHECK([whether signal handlers are one-shot],
+	kaffe_cv_signal_one_shot, [ dnl
+	AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <signal.h>
+int counter = 0;
+RETSIGTYPE hup_handler () { ++counter; }
+int get_counter () { return counter; }
+int main() {
+  signal(1, hup_handler);
+  kill(getpid(), 1);
+  if (get_counter() == 0)
+    exit(1); /* signal was not delivered, can't test reliably */
+  kill(getpid(), 1);
+  if (get_counter() != 2)
+    exit(1); /* signal was not delivered, seems to be one-shot */
+  exit(0);
+}
+]])],[kaffe_cv_signal_one_shot=no],[kaffe_cv_signal_one_shot=yes],[kaffe_cv_signal_one_shot=cross])
+])
+if test x"$kaffe_cv_signal_one_shot" != x"no"; then
+  AC_DEFINE(KAFFE_SIGNAL_ONE_SHOT, 1, [Define if signal handlers must be reset upon delivery])
+fi
+
+AC_TYPE_SIZE_T
+pushdef([AC_DEFINE_SAVED],defn([AC_DEFINE]))
+pushdef([AC_DEFINE],[AC_DEFINE_SAVED([$1],[$2],[Define to $2 if $1 is not defined])])
+AC_CHECK_TYPE(ssize_t, int)
+popdef([AC_DEFINE])
+popdef([AC_DEFINE_SAVED])
+
+dnl -------------------------------------------------------------------------
+
+AC_DEFUN([AC_CHECK_LIBRARY], [dnl
+KSAVE_LIBS="$LIBS"
+LIBS="$$3 $KSAVE_LIBS"
+AC_CHECK_LIB($1,$2)
+$3=`echo "$LIBS" | sed "s% $KSAVE_LIBS$%%"`
+LIBS="$KSAVE_LIBS"
+])
+
+dnl =========================================================================
+dnl Checks for libraries
+dnl -------------------------------------------------------------------------
+
+AC_PROG_GCC_TRADITIONAL
+
+dnl Libraries for programs such as Kaffe and kaffeh
+
+KAFFE_LIBS="$KAFFE_LIBS"
+AC_SUBST(KAFFE_LIBS)
+
+dnl Checks for general math libraries
+
+AC_CHECK_LIBRARY(mw,_mwvalidcheckl,M_LIBS)
+AC_CHECK_LIBRARY(m,sin,M_LIBS)
+
+AC_SUBST(M_LIBS)
+
+dnl If there is no native sysdepCallMethod, let's use libffi
+
+AC_ARG_WITH([libffi],
+	    AS_HELP_STRING([--with-libffi],

*** Patch too long, truncated ***




More information about the kaffe mailing list