fix build error - bug #6
[cacao.git] / configure.in
index f8f8ab7368c2909f7027741283a952a13f752f30..2a32e75fdeed9628ddfe3ef7a4dd9d32ecd116b5 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT(cacao, 0.92cvs, cacao@cacaojvm.org)
+AC_INIT(cacao, 0.92+cvs, cacao@cacaojvm.org)
 AC_CONFIG_SRCDIR(src/cacao/cacao.c)
 AC_CANONICAL_HOST
 AC_PREREQ(2.59)
@@ -14,21 +14,20 @@ AC_PREFIX_DEFAULT(/usr/local/cacao)
 
 dnl system type
 case "$host_cpu" in
-alpha | alphaev56 )
+alpha | alphaev56 | alphapca56 )
        ARCH_DIR="alpha"
-        STATIC_CLASSPATH="1"
        CFLAGS="-mieee -D__ALPHA__"
        ;;
 
 arm )
        ARCH_DIR="arm"
-       STATIC_CLASSPATH="1"
+       ENABLE_STATICVM="1"
        CFLAGS="-D__ARM__"
        ;;
 
 i386 | i486 | i586 | i686 )
        ARCH_DIR="i386"
-       CFLAGS="-D__I386__ $CFLAGS"
+       CFLAGS="-D__I386__"
        ;;
 
 mips )
@@ -56,7 +55,7 @@ x86_64 )
 
 xdspcore )
        ARCH_DIR="xdspcore"
-       STATIC_CLASSPATH="1"
+       ENABLE_STATICVM="1"
        CFLAGS="-D__XDSPCORE__"
        USE_SCHEDULER="1"
        ;;
@@ -126,6 +125,7 @@ AC_CHECK_HEADERS([sys/ioctl.h])
 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
@@ -139,7 +139,6 @@ AC_TYPE_SIGNAL
 AC_CHECK_FUNCS(getcwd gettimeofday mkdir mktime select socket)
 
 dnl Checks for libraries.
-AC_CHECK_LIB(m, fmod)
 
 dnl Checking sizeof void *
 AC_COMPILE_CHECK_SIZEOF(void *)
@@ -214,18 +213,29 @@ dnl Features
 
 dnl check arguments
 
-dnl check for garbage collector
-AC_ARG_ENABLE([gc], [AS_HELP_STRING(--disable-gc,disable garbage collector [[default=yes]])])
+dnl check for garbage collector usage
+AC_ARG_ENABLE([gc], [AS_HELP_STRING(--disable-gc,disable garbage collector (for debugging only!) [[default=yes]])])
 
-AC_MSG_CHECKING(whether GC should be disabled)
+AC_MSG_CHECKING(whether GC should be used)
 if test x"$enable_gc" = "xno"; then
-       AC_MSG_RESULT(yes)
+       AC_MSG_RESULT(no)
        AM_CONDITIONAL([DISABLE_GC], [true])
 else
-       AC_MSG_RESULT(no)
+       AC_MSG_RESULT(yes)
        AM_CONDITIONAL([DISABLE_GC], [false])
 fi
 
+dnl check for dump memory usage
+AC_ARG_ENABLE([gc], [AS_HELP_STRING(--disable-dump,disable dump memory (for debugging only!) [[default=yes]])])
+
+AC_MSG_CHECKING(whether dump memory should be used)
+if test x"$enable_dump" = "xno"; then
+       AC_MSG_RESULT(no)
+       AC_DEFINE([DISABLE_DUMP], 1, [disable dump memory])
+else
+       AC_MSG_RESULT(yes)
+fi
+
 dnl check for statistics
 AC_ARG_ENABLE([statistics], [AS_HELP_STRING(--disable-statistics,disable statistics generation [[default=yes]])])
 
@@ -239,6 +249,19 @@ else
        AM_CONDITIONAL([STATISTICS], [true])
 fi
 
+dnl check for JVMTI
+AC_ARG_ENABLE([jvmti], [AS_HELP_STRING(--enable-jvmti,enable JVMTI [[default=no]])])
+
+AC_MSG_CHECKING(whether to compile JVMTI support)
+if test x"$enable_jvmti" = "xyes"; then
+       AC_MSG_RESULT(yes)
+       AC_DEFINE([ENABLE_JVMTI], 1, [use JVMTI])
+       AM_CONDITIONAL([ENABLE_JVMTI], [true])
+else
+       AC_MSG_RESULT(no)
+       AM_CONDITIONAL([ENABLE_JVMTI], [false])
+fi
+
 
 dnl threads
 AC_ARG_ENABLE([threads], [AS_HELP_STRING(--enable-threads,enable threads support (none,green,native) [[default=native]])])
@@ -371,46 +394,46 @@ else
 fi
 
 
-dnl check if classpath should be linked statically with CACAO
-AC_ARG_ENABLE([dynamicclasspath], [AS_HELP_STRING(--disable-dynamicclasspath, link classpath native code static even on platforms supporting dynamic loading)], [use_dynamicclasspath=$enableval], [use_dynamicclasspath=yes])
+dnl check if CACAO should be linked statically
+AC_ARG_ENABLE([staticvm], [AS_HELP_STRING(--enable-staticvm, link GNU classpath's native libraries statically into CACAO [[default=no]])])
 
-AC_MSG_CHECKING(whether to link GNU classpath statically)
-if test x"$use_dynamicclasspath" = "xno"; then
-       STATIC_CLASSPATH="1"
+AC_MSG_CHECKING(whether to link GNU classpath statically into CACAO)
+if test x"$enable_staticvm" = "xyes"; then
+       ENABLE_STATICVM="1"
 fi
 
-if test x"${STATIC_CLASSPATH}" = "x1"; then
+if test x"${ENABLE_STATICVM}" = "x1"; then
        AC_MSG_RESULT(yes)
-       AM_CONDITIONAL([STATIC_CLASSPATH], [true])
+       AM_CONDITIONAL([ENABLE_STATICVM], [true])
 else
        AC_MSG_RESULT(no)
-       AM_CONDITIONAL([STATIC_CLASSPATH], [false])
+       AM_CONDITIONAL([ENABLE_STATICVM], [false])
 fi
-AC_SUBST(STATIC_CLASSPATH)
+AC_SUBST(ENABLE_STATICVM)
 
 
-dnl enable gtk peer
-AC_ARG_ENABLE([gtk-peer], [AS_HELP_STRING(--enable-gtk-peer,compile GTK native peers [[default=no]])])
+dnl check if we build gtk peers
+AC_ARG_ENABLE([gtk-peer], [AS_HELP_STRING(--disable-gtk-peer,compile GTK native peers [[default=yes]])])
 
-AC_MSG_CHECKING(whether to use GTK awt peers)
-if test x"$enable_gtk_peer" = "xyes"; then
-       AC_MSG_RESULT(yes)
-       AC_DEFINE([USE_GTK], 1, [use gtk])
-       AM_CONDITIONAL([USE_GTK_PEER], [true])
-       USE_GTK_PEER=yes
-else
+AC_MSG_CHECKING(whether to compile GTK awt peers)
+if test x"$enable_gtk_peer" = "xno"; then
        AC_MSG_RESULT(no)
        AM_CONDITIONAL([USE_GTK_PEER], [false])
        CONFIGURE_ARGS="${CONFIGURE_ARGS} --disable-gtk-peer"
        USE_GTK_PEER=no
+else
+       AC_MSG_RESULT(yes)
+       AC_DEFINE([USE_GTK], 1, [use gtk])
+       AM_CONDITIONAL([USE_GTK_PEER], [true])
+       USE_GTK_PEER=yes
 fi
 AC_SUBST(USE_GTK_PEER)
 
 
 dnl pass configure options to classpath
-if test x"${STATIC_CLASSPATH}" = "x1"; then
-        AC_DEFINE([STATIC_CLASSPATH], 1, [use classpath statically linked])
-       AM_CONDITIONAL([STATIC_CLASSPATH], [true])
+if test x"${ENABLE_STATICVM}" = "x1"; then
+        AC_DEFINE([ENABLE_STATICVM], 1, [link CACAO statically])
+       AM_CONDITIONAL([ENABLE_STATICVM], [true])
        CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-static --disable-shared"
 
        dnl check for some classpath related stuff when we link statically
@@ -438,7 +461,7 @@ if test x"${STATIC_CLASSPATH}" = "x1"; then
                AC_SUBST(PANGOFT2_CFLAGS)
        fi
 else
-       AM_CONDITIONAL([STATIC_CLASSPATH], [false])
+       AM_CONDITIONAL([ENABLE_STATICVM], [false])
        CONFIGURE_ARGS="${CONFIGURE_ARGS} --disable-static --enable-shared"
 fi
 
@@ -475,6 +498,7 @@ AC_CONFIG_SUBDIRS(src/boehm-gc src/classpath src/libltdl)
 
 
 AC_CONFIG_FILES([Makefile]
+               [contrib/Makefile]
                [doc/Makefile]
                [doc/handbook/Makefile]
                [man/Makefile]
@@ -485,13 +509,14 @@ AC_CONFIG_FILES([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/cacao]
                [src/scripts/java]
+               [src/scripts/javac]
                [src/scripts/kjc]
-               [src/scripts/rmic]
                [src/scripts/rmiregistry]
                [src/threads/Makefile]
                [src/threads/green/Makefile]
@@ -516,8 +541,8 @@ AC_CONFIG_FILES([Makefile]
                [src/vm/jit/x86_64/Makefile]
                [tests/Makefile]
                [tests/codepatching/Makefile]
-               [tests/kaffe/Makefile]
-               [tests/native/Makefile])
+               [tests/native/Makefile]
+               [tests/regression/Makefile])
 
 AC_OUTPUT