-cdnl autoconf; autoheader; automake
-
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([main.c])
-AC_CANONICAL_HOST
+AC_INIT(cacao, 0.93+cvs, cacao@cacaojvm.org)
+AC_CONFIG_SRCDIR(src/cacao/cacao.c)
+AC_CANONICAL_HOST
AC_PREREQ(2.59)
-AM_INIT_AUTOMAKE(cacao, 0.40)
+AM_INIT_AUTOMAKE([1.9.0])
+AM_MAINTAINER_MODE
+
AM_CONFIG_HEADER([config.h])
AC_PREFIX_DEFAULT(/usr/local/cacao)
-dnl system type
+dnl set optimization and debugging for all architectures and systems
+if test x"$CFLAGS" = "x"; then
+ CFLAGS="-O0 -g3"
+fi
+
+dnl system type
case "$host_cpu" in
-alpha* )
+alpha | alphaev56 | alphapca56 )
ARCH_DIR="alpha"
- CFLAGS="-Wall -O2 -g3 -mieee -D__ALPHA__"
- AC_DEFINE([TRACE_ARGS_NUM], 6, [Defines integer argument register count])
- AC_DEFINE([USE_CODEMMAP], 1, [use code mmap])
+ CFLAGS="$CFLAGS -mieee -D__ALPHA__"
+ ;;
+
+arm | armv4tl | armv5b )
+ ARCH_DIR="arm"
+ CFLAGS="$CFLAGS -D__ARM__"
;;
-i386* | i486* | i586* | i686* )
+i386 | i486 | i586 | i686 )
ARCH_DIR="i386"
- CFLAGS="-Wall -O0 -g3 -D__I386__"
- AC_DEFINE([TRACE_ARGS_NUM], 8, [Defines integer argument register count])
- AC_DEFINE([USE_CODEMMAP], 1, [use code mmap])
+ CFLAGS="$CFLAGS -D__I386__"
;;
-mips* )
+mips )
ARCH_DIR="mips"
- CFLAGS="-64 -O2 -OPT:Olimit=0 -g -DMAP_ANONYMOUS=0 -woff 1110,1164,1515 -D__MIPS__"
- LIBS="-lelfutil"
- AC_DEFINE([TRACE_ARGS_NUM], 8, [Defines integer argument register count])
+ CFLAGS="$CFLAGS -D__MIPS__"
;;
-powerpc* | ppc* )
+powerpc )
ARCH_DIR="powerpc"
- CFLAGS="-Wall -O2 -g -DMAP_ANONYMOUS=0 -no-cpp-precomp -D__POWERPC__"
- AC_DEFINE([TRACE_ARGS_NUM], 8, [Defines integer argument register count])
+ CFLAGS="$CFLAGS -D__POWERPC__"
;;
-x86_64* )
+x86_64 )
ARCH_DIR="x86_64"
- CFLAGS="-Wall -O2 -g3 -D__X86_64__"
- AC_DEFINE([TRACE_ARGS_NUM], 6, [Defines integer argument register count])
- AC_DEFINE([USE_CODEMMAP], 1, [use code mmap])
+ CFLAGS="$CFLAGS -D__X86_64__"
;;
-sparc* | * )
+xdspcore )
+ ARCH_DIR="xdspcore"
+ ENABLE_STATICVM="yes"
+ CFLAGS="$CFLAGS -D__XDSPCORE__"
+ USE_SCHEDULER="1"
+ ;;
+* )
AC_MSG_ERROR($host_cpu systems are not supported at this time)
;;
esac
-
+dnl host type
case "$host_os" in
*linux* | *Linux* )
- CFLAGS="$CFLAGS -D__LINUX__ -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
+ OS_DIR="linux"
+ CFLAGS="$CFLAGS -D__LINUX__ -ansi -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
;;
*darwin* )
- CFLAGS="$CFLAGS -D__DARWIN__"
+ OS_DIR="darwin"
+ CFLAGS="$CFLAGS -D__DARWIN__ -ansi -pedantic -Wall -Wno-long-long"
+ ;;
+*freebsd* )
+ OS_DIR="freebsd"
+ CFLAGS="$CFLAGS -D__FREEBSD__ -ansi -pedantic -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
+ ;;
+*irix* )
+ OS_DIR="irix"
+ CFLAGS="$CFLAGS -D__IRIX__"
;;
* )
;;
esac
-AC_SUBST(COMPILER_OBJECTS)
-AC_DEFINE_UNQUOTED([ARCH_DIR], "$ARCH_DIR", [Architecture directory])
+dnl define and substitute some architecture specific variables
+AC_DEFINE_UNQUOTED([ARCH_DIR], "${ARCH_DIR}", [architecture directory])
AC_SUBST(ARCH_DIR)
+AC_SUBST(OS_DIR)
+AC_SUBST(USE_SCHEDULER)
+
dnl Checks for programs.
AC_PROG_CC
AM_PROG_AS
+AC_PROG_LD
+AC_PROG_LD_GNU
AC_PROG_RANLIB
+AC_DISABLE_SHARED
+AC_PROG_LN_S
AC_PROG_MAKE_SET
-dnl Checks for libraries.
-dnl AC_CHECK_LIB(m, sin)
+dnl libtool stuff
+AC_LIBTOOL_DLOPEN
+AC_LIBLTDL_CONVENIENCE
+AC_PROG_LIBTOOL
+AC_SUBST(LIBLTDL)
dnl Checks for header files.
AC_HEADER_DIRENT
AC_CHECK_HEADERS([unistd.h])
AC_CHECK_HEADERS([sys/ioctl.h])
+dnl this is for fdlibm
+AC_CHECK_HEADERS([stdint.h])
+AC_CHECK_HEADERS([inttypes.h])
+AC_CHECK_HEADERS([sys/config.h])
+AC_CHECK_HEADERS([sys/types.h])
+AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
+AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
+AC_EGREP_HEADER(u_int32_t, sys/types.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [Define to 1 if you have BSD u_int32_t]))
+AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [Define to 1 if you have BSD u_int32_t]))
+
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
+AC_C_ATTRIBUTE
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
-AC_FUNC_MEMCMP
-AC_FUNC_MMAP
AC_TYPE_SIGNAL
-AC_CHECK_FUNCS(getcwd gettimeofday mkdir mktime select socket)
-
-dnl Check for mmap header anomalies (missing MAP_FAILED, etc.)
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
- AC_CACHE_CHECK(whether MAP_FAILED is defined,
- ac_cv_map_failed,
- AC_EGREP_CPP(yes,
- [#include <sys/mman.h>
- #ifdef MAP_FAILED
- yes
- #endif],
- ac_cv_map_failed=yes,
- ac_cv_map_failed=no))
-
- AC_CACHE_CHECK(whether MAP_ANONYMOUS is defined,
- ac_cv_map_anonymous,
- AC_EGREP_CPP(yes,
- [#include <sys/mman.h>
- #ifdef MAP_ANONYMOUS
- yes
- #endif],
- ac_cv_map_anonymous=yes,
- ac_cv_map_anonymous=no))
-
- if test $ac_cv_map_failed = yes; then
- AC_DEFINE([HAVE_MAP_FAILED], 1, [Define if mman.h defines MAP_FAILED])
- fi
+AC_FUNC_MEMCMP
+AC_CHECK_FUNCS(calloc mprotect getpagesize free)
+AC_CHECK_FUNCS(getcwd gettimeofday)
+AC_CHECK_FUNCS(scandir)
+AC_CHECK_FUNCS(mmap)
- if test $ac_cv_map_anonymous = yes; then
- AC_DEFINE([HAVE_MAP_ANONYMOUS], 1, [Define if mman.h defines MAP_ANONYMOUS])
- fi
+dnl Checks for libraries.
+
+dnl Checking sizeof void *
+AC_COMPILE_CHECK_SIZEOF(void *)
+AC_C_BIGENDIAN
+
+
+dnl check which ld flags are required to export symbols
+if test x"$with_gnu_ld" = "xyes"; then
+ EXPORT_SYMBOLS_FLAGS="-Wl,--export-dynamic"
+else
+ EXPORT_SYMBOLS_FLAGS=""
fi
+AC_SUBST(EXPORT_SYMBOLS_FLAGS)
+
+
+dnl define install prefix
+if test "x$prefix" = "xNONE"; then
+ CACAO_INSTALL_PREFIX=$ac_default_prefix
+else
+ CACAO_INSTALL_PREFIX=$prefix
+fi
+AC_DEFINE_UNQUOTED([CACAO_INSTALL_PREFIX], "${CACAO_INSTALL_PREFIX}", [installation prefix])
+AC_SUBST(CACAO_INSTALL_PREFIX)
dnl Features
dnl check arguments
-AC_ARG_ENABLE([threads], [AS_HELP_STRING(--enable-threads,enable threads support (none,green,native) [[default=native]])])
-AC_ARG_ENABLE([__thread], [AS_HELP_STRING(--disable-__thread,do not use TLS features even when supporting them)], [use__thread=$enablevalval], [use__thread=yes])
+
+dnl check for JIT compiler
+AC_MSG_CHECKING(whether JIT compiled should be compiled)
+AC_ARG_ENABLE([jit],
+ [AS_HELP_STRING(--disable-jit,disable JIT compiler [[default=yes]])],
+ [case "${enableval}" in
+ no) ENABLE_JIT=no;;
+ *) ENABLE_JIT=yes;;
+ esac],
+ [ENABLE_JIT=yes])
+AC_MSG_RESULT(${ENABLE_JIT})
+AM_CONDITIONAL([ENABLE_JIT], test x"${ENABLE_JIT}" = "xyes")
+
+if test x"${ENABLE_JIT}" = "xyes"; then
+ AC_DEFINE([ENABLE_JIT], 1, [enable JIT compiler])
+fi
+
+
+dnl check for interpreter
+AC_ARG_ENABLE([intrp], [AS_HELP_STRING(--enable-intrp,enable interpreter [[default=no]])])
+
+AC_MSG_CHECKING(whether interpreter should be compiled)
+if test x"$enable_intrp" = "xyes"; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([ENABLE_INTRP], 1, [enable interpreter])
+ AM_CONDITIONAL([ENABLE_INTRP], [true])
+ ENABLE_INTRP=yes
+
+ AC_ASM_SKIP16
+
+ dnl check for libffi
+ AC_ARG_WITH([ffi],
+ [AS_HELP_STRING(--with-ffi,use libffi to call native functions)],
+ [WITH_FFI=yes
+ AC_CHECK_HEADERS([ffi.h],, [AC_MSG_ERROR(cannot find ffi.h)])
+ AC_CHECK_LIB(ffi, ffi_call,, [AC_MSG_ERROR(cannot find libffi)])
+ AC_DEFINE([WITH_FFI], 1, [use libffi])],
+ [WITH_FFI=no])
+
+ dnl check for libffcall
+ AC_ARG_WITH([ffcall],
+ [AS_HELP_STRING(--with-ffcall,use libffcall to call native functions)],
+ [WITH_FFCALL=yes
+ AC_CHECK_HEADERS([avcall.h],, [AC_MSG_ERROR(cannot find avcall.h)])
+ AC_CHECK_LIB(avcall, __builtin_avcall,, [AC_MSG_ERROR(cannot find libavcall (from libffcall))])
+ AC_DEFINE([WITH_FFCALL], 1, [use libffcall])],
+ [WITH_FFCALL=no])
+
+ dnl check for libffi or libffcall
+ if test x"${WITH_FFI}" = "xyes" -a x"${WITH_FFCALL}" = "xyes"; then
+ AC_ERROR(Enable only libffi or libffcall.)
+ fi
+ if test x"${WITH_FFI}" = "xno" -a x"${WITH_FFCALL}" = "xno"; then
+ AC_ERROR(Enable one of libffi or libffcall.)
+ fi
+
+else
+ AC_MSG_RESULT(no)
+ AM_CONDITIONAL([ENABLE_INTRP], [false])
+ ENABLE_INTRP="no"
+fi
+
+if test x"${ENABLE_JIT}" = "xyes" -a x"${ENABLE_INTRP}" = "xyes"; then
+ AC_ERROR(This is currently not supported. Please disable the JIT or the interpreter.)
+fi
+if test x"${ENABLE_JIT}" = "xno" -a x"${ENABLE_INTRP}" = "xno"; then
+ AC_ERROR(You have to enable at least the JIT or the interpreter.)
+fi
+
+
+dnl check for garbage collector usage
+AC_MSG_CHECKING(whether GC should be disabled)
+AC_ARG_ENABLE([gc],
+ [AS_HELP_STRING(--disable-gc,disable garbage collector (for debugging only!) [[default=yes]])],
+ [case "${enableval}" in
+ no) DISABLE_GC=yes
+ AC_DEFINE([DISABLE_GC], 1, [disable garbage collector])
+ ;;
+ *) DISABLE_GC=no;;
+ esac],
+ [DISABLE_GC=no])
+AC_MSG_RESULT(${DISABLE_GC})
+AM_CONDITIONAL([DISABLE_GC], test x"${DISABLE_GC}" = "xyes")
+
+
+dnl check for dump memory usage
+AC_MSG_CHECKING(whether dump memory should be disabled)
+AC_ARG_ENABLE([dump],
+ [AS_HELP_STRING(--disable-dump,disable dump memory (for debugging only!) [[default=yes]])],
+ [case "${enableval}" in
+ no)
+ DISABLE_DUMP=yes
+ AC_DEFINE([DISABLE_DUMP], 1, [disable dump memory])
+ ;;
+ *) DISABLE_DUMP=no;;
+ esac],
+ [DISABLE_DUMP=no])
+AC_MSG_RESULT(${DISABLE_DUMP})
+
+
+dnl check for debug
+AC_MSG_CHECKING(whether debug code generation should be enabled)
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING(--disable-debug,disable debug code generation [[default=yes]])],
+ [case "${enableval}" in
+ no) NDEBUG=yes
+ AC_DEFINE([NDEBUG], 1, [disable debug code])
+ ;;
+ *) NDEBUG=no;;
+ esac],
+ [NDEBUG=no])
+AC_MSG_RESULT(${NDEBUG})
+
+
+dnl check for statistics
+AC_MSG_CHECKING(whether statistics generation should be enabled)
+AC_ARG_ENABLE([statistics],
+ [AS_HELP_STRING(--disable-statistics,disable statistics generation [[default=yes]])],
+ [case "${enableval}" in
+ no) ENABLE_STATISTICS=no;;
+ *) ENABLE_STATISTICS=yes;;
+ esac],
+ [ENABLE_STATISTICS=yes])
+AC_MSG_RESULT(${ENABLE_STATISTICS})
+AM_CONDITIONAL([ENABLE_STATISTICS], test x"${ENABLE_STATISTICS}" = "xyes")
+
+if test x"$enable_statistics" = "xno"; then
+ AC_DEFINE([ENABLE_STATISTICS], 1, [enable statistics])
+fi
+
+
+dnl check for JVMTI
+AC_MSG_CHECKING(whether to compile JVMTI support)
+AC_ARG_ENABLE([jvmti],
+ [AS_HELP_STRING(--enable-jvmti,enable JVMTI [[default=no]])],
+ [case "${enableval}" in
+ yes) ENABLE_JVMTI=yes;;
+ *) ENABLE_JVMTI=no;;
+ esac],
+ [ENABLE_JVMTI=no])
+AC_MSG_RESULT(${ENABLE_JVMTI})
+AM_CONDITIONAL([ENABLE_JVMTI], test x"${ENABLE_JVMTI}" = "xyes")
+
+if test x"${ENABLE_JVMTI}" = "xyes"; then
+ AC_DEFINE([ENABLE_JVMTI], 1, [use JVMTI])
+fi
dnl threads
+AC_ARG_ENABLE([threads], [AS_HELP_STRING(--enable-threads,enable threads support (none,green,native) [[default=native]])])
+AC_ARG_ENABLE([__thread], [AS_HELP_STRING(--enable-__thread,use TLS features)], [use__thread=$enableval], [use__thread=no])
+
AC_MSG_CHECKING(whether to include threads support)
enable_threads=${enable_threads:-native}
case "$enable_threads" in
AC_MSG_RESULT(no)
dnl no threads for boehm
ac_configure_args="$ac_configure_args --disable-boehm-threads"
+ AM_CONDITIONAL([USE_THREADS], [false])
+ AM_CONDITIONAL([NATIVE_THREADS], [false])
;;
+
green | native | posix | pthreads)
AC_DEFINE([USE_THREADS], 1, [use threads])
- AC_DEFINE([EXTERNAL_OVERFLOW], 1, [external overflow])
- AC_DEFINE([DONT_FREE_FIRST], 1, [don't free first])
- LIBTHREAD="libthreads.a"
- THREAD_OBJ="threads/libthreads.a"
- AC_SUBST(LIBTHREAD)
- AC_SUBST(THREAD_OBJ)
+ AM_CONDITIONAL([USE_THREADS], [true])
if test x"$enable_threads" != "xgreen"; then
- AC_DEFINE([NATIVE_THREADS], 1, [use pthreads])
- THREAD_LIB="-lpthread"
- AC_SUBST(THREAD_LIB)
AC_MSG_RESULT(yes, native)
AC_CHECK_LIB(pthread, main)
+ AC_DEFINE([NATIVE_THREADS], 1, [use pthreads])
CFLAGS="$CFLAGS -D_REENTRANT"
- dnl tell boehm to support threads as well and classpath to
- dnl synchronize VM threads portably
- ac_configure_args="$ac_configure_args --enable-boehm-threads=posix --enable-portable-native-sync"
+ dnl tell boehm to support threads as well
+ ac_configure_args="$ac_configure_args --enable-boehm-threads=posix"
+ AM_CONDITIONAL([NATIVE_THREADS], [true])
+
else
AC_MSG_RESULT(yes, green)
dnl no threads for boehm
ac_configure_args="$ac_configure_args --disable-boehm-threads"
+ AM_CONDITIONAL([NATIVE_THREADS], [false])
fi
;;
*)
fi
-dnl check if zlib should be used
-AC_ARG_ENABLE([zlib], [AS_HELP_STRING(--enable-zlib,enable zip archive class storage (needs zlib) [[default=yes]])])
+dnl check if linear scan register allocator(lsra) should be used
+AC_MSG_CHECKING(whether lsra should be supported)
+AC_ARG_ENABLE([lsra],
+ [AS_HELP_STRING(--enable-lsra,enable linear scan register allocator [[default=yes]])],
+ [case "${enableval}" in
+ no) ENABLE_LSRA=no;;
+ *) ENABLE_LSRA=yes;;
+ esac],
+ [ENABLE_LSRA=yes])
+AC_MSG_RESULT(${ENABLE_LSRA})
-AC_MSG_CHECKING(whether zip archives should be supported)
-if test x"$enable_zlib" = "xno"; then
- ZIP_LIBS=""
- ZIP_C=""
- AC_MSG_RESULT(no)
-else
- ZIP_LIBS="-lz"
- ZIP_C="unzip.c"
- AC_DEFINE([USE_ZLIB], 1, [use zlib])
- AC_MSG_RESULT(yes)
- AC_CHECK_LIB(z, main)
+if test x"${ENABLE_LSRA}" = "xyes"; then
+ AC_DEFINE([ENABLE_LSRA], 1, [enable lsra])
fi
-AC_SUBST(ZIP_LIBS)
-AC_SUBST(ZIP_C)
-dnl set some essential classpath options, even if their classpath default is
-dnl suitable for us
-ac_configure_args="$ac_configure_args --enable-jni --disable-cni --disable-regen-headers --enable-static --enable-shared --enable-load-library"
+dnl check for inlining
+dnl AC_ARG_ENABLE([inlining], [AS_HELP_STRING(--disable-inlining,disable method inlining [[default=yes]])])
+dnl AC_MSG_CHECKING(whether method inlining should be disabled)
+dnl if test x"$enable_inlining" = "xno"; then
+dnl AC_MSG_RESULT(yes)
+dnl AM_CONDITIONAL([USE_INLINING], [false])
+dnl else
+dnl AC_MSG_RESULT(no)
+ AC_DEFINE([USE_INLINING], 1, [use method inlining])
+ AM_CONDITIONAL([USE_INLINING], [true])
+dnl fi
-dnl check arguments
-AC_ARG_ENABLE([gtk-peer], [AS_HELP_STRING(--enable-gtk-peer,compile GTK native peers [[default=no]])])
+dnl check for instruction scheduler
+AC_ARG_ENABLE([scheduler], [AS_HELP_STRING(--enable-scheduler,enable instruction scheduler [[default=no]])])
-dnl enable gtk peer
-AC_MSG_CHECKING(whether to use gtk awt peers)
-if test x"$enable_gtk_peer" = "xyes"; then
- AC_MSG_RESULT(yes)
- AWTPEERS="java.awt.peer.ComponentPeer \
- java.awt.peer.MenuPeer \
- java.awt.peer.MenuItemPeer \
- gnu.java.awt.peer.gtk.GdkPixbufDecoder \
- gnu.java.awt.peer.gtk.GtkGenericPeer \
- gnu.java.awt.peer.gtk.GtkMenuBarPeer \
- gnu.java.awt.peer.gtk.GtkScrollPanePeer \
- gnu.java.awt.peer.gtk.GtkMenuPeer \
- gnu.java.awt.peer.gtk.GtkTextComponentPeer \
- gnu.java.awt.peer.gtk.GtkComponentPeer \
- gnu.java.awt.peer.gtk.GtkPopupMenuPeer \
- gnu.java.awt.peer.gtk.GtkCheckboxPeer \
- gnu.java.awt.peer.gtk.GtkCheckboxGroupPeer \
- gnu.java.awt.peer.gtk.GtkMenuItemPeer \
- gnu.java.awt.peer.gtk.GdkGraphics \
- gnu.java.awt.peer.gtk.GtkToolkit \
- gnu.java.awt.peer.gtk.GtkCanvasPeer \
- gnu.java.awt.peer.gtk.GtkFramePeer \
- gnu.java.awt.peer.gtk.GdkFontMetrics \
- gnu.java.awt.peer.gtk.GtkScrollbarPeer \
- gnu.java.awt.peer.gtk.GtkListPeer \
- gnu.java.awt.peer.gtk.GtkLabelPeer \
- gnu.java.awt.peer.gtk.GtkTextAreaPeer \
- gnu.java.awt.peer.gtk.GtkFileDialogPeer \
- gnu.java.awt.peer.gtk.GtkImagePainter \
- gnu.java.awt.peer.gtk.GtkChoicePeer \
- gnu.java.awt.peer.gtk.GtkPanelPeer \
- gnu.java.awt.peer.gtk.GtkMainThread \
- gnu.java.awt.peer.gtk.GtkButtonPeer \
- gnu.java.awt.peer.gtk.GtkTextFieldPeer \
- gnu.java.awt.peer.gtk.GtkCheckboxMenuItemPeer \
- gnu.java.awt.peer.gtk.GtkClipboard \
- gnu.java.awt.peer.gtk.GtkWindowPeer"
- AWT_OBJS="classpath/native/jni/gtk-peer/.libs/libgtkpeer.a \
- -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 \
- -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 \
- -lgthread-2.0 -lart_lgpl_2"
- USEGTK="yes"
- AC_SUBST(USEGTK)
- AC_SUBST(AWTPEERS)
- AC_SUBST(AWT_OBJS)
- AC_DEFINE([USE_GTK], 1, [use gtk])
+AC_MSG_CHECKING(whether instruction scheduler should be supported)
+if test x"${USE_SCHEDULER}" = "x1" -o x"$enable_scheduler" = "xyes"; then
+ case "${ARCH_DIR}" in
+ xdspcore )
+ ;;
+ * )
+ AC_MSG_ERROR(instruction scheduler is not available for ${ARCH_DIR} code generator)
+ ;;
+ esac
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([USE_SCHEDULER], 1, [use scheduler])
+ AM_CONDITIONAL([USE_SCHEDULER], [true])
else
- AWT_OBJS=""
- AWTPEERS=""
- USEGTK="no"
- AC_SUBST(USEGTK)
- AC_SUBST(AWTPEERS)
- AC_SUBST(AWT_OBJS)
AC_MSG_RESULT(no)
+ AM_CONDITIONAL([USE_SCHEDULER], [false])
+fi
+
+
+dnl check if zlib should be used
+AC_MSG_CHECKING(whether zip archives should be supported)
+AC_ARG_ENABLE([zlib],
+ [AS_HELP_STRING(--enable-zlib,enable zip archive class storage (needs zlib) [[default=yes]])],
+ [case "${enableval}" in
+ no) ENABLE_ZLIB=yes;;
+ *) ENABLE_ZLIB=no;;
+ esac],
+ [ENABLE_ZLIB=yes])
+AC_MSG_RESULT(${ENABLE_ZLIB})
+
+if test x"${ENABLE_ZLIB}" = "xyes"; then
+ AC_CHECK_HEADERS([zlib.h],, [AC_MSG_ERROR(cannot find zlib.h)])
+ AC_CHECK_LIB(z, inflate,, [AC_MSG_ERROR(cannot find libz)])
+ AC_DEFINE([ENABLE_ZLIB], 1, [use zlib])
+fi
+AM_CONDITIONAL([ENABLE_ZLIB], test x"${ENABLE_ZLIB}" = "xyes")
- ac_configure_args="$ac_configure_args --disable-gtk-peer"
+
+dnl check if CACAO should be linked statically
+AC_MSG_CHECKING(whether to link GNU classpath native libraries statically into CACAO)
+AC_ARG_ENABLE([staticvm],
+ [AS_HELP_STRING(--enable-staticvm, link GNU classpath native libraries statically into CACAO [[default=no]])],
+ [case "${enableval}" in
+ yes) ENABLE_STATICVM=yes;;
+ *) ENABLE_STATICVM=no;;
+ esac],
+ [ENABLE_STATICVM=no])
+AC_MSG_RESULT(${ENABLE_STATICVM})
+
+if test x"${ENABLE_STATICVM}" = "xyes"; then
+ AC_DEFINE([ENABLE_STATICVM], 1, [link CACAO statically])
+
+ dnl check for some classpath related stuff when we link statically
+ AM_ICONV_LINK
+fi
+AM_CONDITIONAL([ENABLE_STATICVM], test x"${ENABLE_STATICVM}" = "xyes")
+AC_SUBST(ENABLE_STATICVM)
+
+
+dnl is GNU classpath installed somewhere different
+AC_MSG_CHECKING(where GNU classpath is installed)
+AC_ARG_WITH([classpath-install-dir],
+ [AS_HELP_STRING(--with-classpath-install-dir=<dir>,installation directory of GNU classpath [[default=/usr/local/classpath]])],
+ [CLASSPATH_INSTALL_DIR=${withval}],
+ [CLASSPATH_INSTALL_DIR=/usr/local/classpath])
+AC_MSG_RESULT(${CLASSPATH_INSTALL_DIR})
+AC_DEFINE_UNQUOTED([CLASSPATH_INSTALL_DIR], "${CLASSPATH_INSTALL_DIR}", [GNU classpath installation directory])
+AC_SUBST(CLASSPATH_INSTALL_DIR)
+
+
+dnl Maybe the user has Classpath installed 'flat'.
+AC_ARG_WITH([flat-classpath], [AS_HELP_STRING(--with-flat-classpath, GNU Classpath is not zipped in the install directory)])
+if test x"$with_flat_classpath" = "x"; then
+ GLIBJZ=glibj.zip
+else
+ GLIBJZ=
fi
+AC_SUBST(GLIBJZ)
+AC_DEFINE_UNQUOTED(GLIBJZ_STRING, "$GLIBJZ", [define to the string base name of the classpath zip file])
-dnl now configure boehm gc and gnu classpath
+dnl now configure subpackages
dnl the export is not my favorite (is there another way?)
export CFLAGS
-AC_CONFIG_SUBDIRS(mm/boehm-gc classpath)
-
-
-AC_OUTPUT(Makefile \
- mm/Makefile \
- toolbox/Makefile \
- threads/Makefile \
- jit/Makefile \
- jit/loop/Makefile \
- jit/alpha/Makefile \
- jit/i386/Makefile \
- jit/mips/Makefile \
- jit/powerpc/Makefile \
- jit/x86_64/Makefile \
- nat/Makefile \
- doc/Makefile \
- tst/Makefile \
- tst/kaffe/Makefile \
- jvmtst/Makefile )
+AC_CONFIG_SUBDIRS(src/boehm-gc src/libltdl)
+
+AC_CONFIG_FILES([Makefile]
+ [contrib/Makefile]
+ [contrib/setenvinstalled]
+ [contrib/setenvsource]
+ [doc/Makefile]
+ [doc/handbook/Makefile]
+ [man/Makefile]
+ [src/Makefile]
+ [src/cacao/Makefile]
+ [src/cacaoh/Makefile]
+ [src/fdlibm/Makefile]
+ [src/lib/Makefile]
+ [src/mm/Makefile]
+ [src/native/Makefile]
+ [src/native/include/Makefile]
+ [src/native/jvmti/Makefile]
+ [src/native/tools/Makefile]
+ [src/native/vm/Makefile]
+ [src/scripts/Makefile]
+ [src/scripts/java]
+ [src/scripts/rmiregistry]
+ [src/threads/Makefile]
+ [src/threads/green/Makefile]
+ [src/threads/native/Makefile]
+ [src/toolbox/Makefile]
+ [src/vm/Makefile]
+ [src/vm/jit/Makefile]
+ [src/vm/jit/alpha/Makefile]
+ [src/vm/jit/alpha/freebsd/Makefile]
+ [src/vm/jit/alpha/linux/Makefile]
+ [src/vm/jit/i386/Makefile]
+ [src/vm/jit/i386/freebsd/Makefile]
+ [src/vm/jit/i386/linux/Makefile]
+ [src/vm/jit/intrp/Makefile]
+ [src/vm/jit/inline/Makefile]
+ [src/vm/jit/loop/Makefile]
+ [src/vm/jit/mips/Makefile]
+ [src/vm/jit/mips/irix/Makefile]
+ [src/vm/jit/mips/linux/Makefile]
+ [src/vm/jit/powerpc/Makefile]
+ [src/vm/jit/powerpc/darwin/Makefile]
+ [src/vm/jit/powerpc/linux/Makefile]
+ [src/vm/jit/schedule/Makefile]
+ [src/vm/jit/tools/Makefile]
+ [src/vm/jit/verify/Makefile]
+ [src/vm/jit/x86_64/Makefile]
+ [tests/Makefile]
+ [tests/codepatching/Makefile]
+ [tests/native/Makefile]
+ [tests/regression/Makefile])
+
+AC_OUTPUT
+
+
+## Local variables:
+## mode: m4
+## indent-tabs-mode: t
+## c-basic-offset: 4
+## tab-width: 8
+## compile-command: "automake --add-missing"
+## End: