almost all required function implemented - first integration with jdwp - nothing...
[cacao.git] / configure.in
index a64b95bef6ddcf6c52232dcddc79f0e076f9afa3..14f38e0eb0fd1a4e2d51cafb141136419c9d8b0d 100644 (file)
@@ -12,50 +12,47 @@ AM_CONFIG_HEADER([config.h])
 AC_PREFIX_DEFAULT(/usr/local/cacao)
 
 
+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 | alphaev56 | alphapca56 )
        ARCH_DIR="alpha"
-       CFLAGS="-mieee -D__ALPHA__"
+       CFLAGS="$CFLAGS -mieee -D__ALPHA__"
        ;;
 
 arm | armv4tl | armv5b )
        ARCH_DIR="arm"
-       CFLAGS="-D__ARM__"
+       CFLAGS="$CFLAGS -D__ARM__"
        ;;
 
 i386 | i486 | i586 | i686 )
        ARCH_DIR="i386"
-       CFLAGS="-D__I386__"
+       CFLAGS="$CFLAGS -D__I386__"
        ;;
 
 mips )
        ARCH_DIR="mips"
-
-dnl for MIPSPro Compiler
-dnl    CFLAGS="-64 -OPT:Olimit=0 -woff 1110,1164,1515 -D__MIPS__ -D__MIPSEB__"
-       CFLAGS="-64 -OPT:Olimit=0 -D__MIPS__ -D__MIPSEB__"
-dnl    CFLAGS="-D__MIPS__ -D__MIPSEB__"
-
-dnl for GCC
-dnl    CFLAGS="-mabi=64 -D__MIPS__ -D__MIPSEB__"
-dnl    LDFLAGS="-mabi=64"
+       CFLAGS="$CFLAGS -D__MIPS__"
        ;;
 
 powerpc )
        ARCH_DIR="powerpc"
-       CFLAGS="-D__POWERPC__"
+       CFLAGS="$CFLAGS -D__POWERPC__"
        ;;
 
 x86_64 )
        ARCH_DIR="x86_64"
-       CFLAGS="-D__X86_64__"
+       CFLAGS="$CFLAGS -D__X86_64__"
        ;;
 
 xdspcore )
        ARCH_DIR="xdspcore"
        ENABLE_STATICVM="yes"
-       CFLAGS="-D__XDSPCORE__"
+       CFLAGS="$CFLAGS -D__XDSPCORE__"
        USE_SCHEDULER="1"
        ;;
 * )
@@ -63,23 +60,19 @@ xdspcore )
         ;;
 esac
 
-
-dnl set optimization and debugging for all architectures and systems
-CFLAGS="-O0 -g3 $CFLAGS"
-
-
+dnl host type
 case "$host_os" in
 *linux* | *Linux* )
        OS_DIR="linux"
-        CFLAGS="-ansi -pedantic -Wall -Wno-long-long $CFLAGS -D__LINUX__ -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
+        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* )
        OS_DIR="darwin"
-        CFLAGS="-ansi -pedantic -Wall -Wno-long-long $CFLAGS -D__DARWIN__"
+        CFLAGS="$CFLAGS __DARWIN__ -ansi -pedantic -Wall -Wno-long-long"
         ;;
 *freebsd* )
        OS_DIR="freebsd"
-       CFLAGS="-ansi -pedantic -Wall -Wno-long-long $CFLAGS -D__FREEBSD__ -D_XOPEN_SOURCE_EXTENDED"
+       CFLAGS="$CFLAGS -D__FREEBSD__ -ansi -pedantic -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
        ;;
 *irix* )
        OS_DIR="irix"
@@ -142,10 +135,10 @@ AC_STRUCT_TM
 
 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)
+AC_FUNC_MEMCMP
+AC_CHECK_FUNCS(calloc mprotect getpagesize free)
+AC_CHECK_FUNCS(getcwd gettimeofday)
 
 dnl Checks for libraries.
 
@@ -153,52 +146,6 @@ dnl Checking sizeof void *
 AC_COMPILE_CHECK_SIZEOF(void *)
 AC_C_BIGENDIAN
 
-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))
-
-       AC_CACHE_CHECK(whether MAP_ANON is defined,
-                      ac_cv_map_anon,
-                      AC_EGREP_CPP(yes, 
-                                   [#include <sys/mman.h>
-                                    #ifdef MAP_ANON
-                                       yes
-                                    #endif],
-                                   ac_cv_map_anon=yes,
-                                   ac_cv_map_anon=no))
-
-       if test $ac_cv_map_failed = yes; then
-               AC_DEFINE([HAVE_MAP_FAILED], 1, [Define if <sys/mman.h> defines MAP_FAILED])
-       fi
-
-       if test $ac_cv_map_anonymous = yes; then
-               AC_DEFINE([HAVE_MAP_ANONYMOUS], 1, [Define if <sys/mman.h> defines MAP_ANONYMOUS])
-       fi
-
-       if test $ac_cv_map_anon = yes; then
-               AC_DEFINE([HAVE_MAP_ANON], 1, [Define if <sys/mman.h> defines MAP_ANON])
-       fi
-fi
-
-
 dnl check which ld flags are required to export symbols
 if test x"$with_gnu_ld" = "xyes"; then
        EXPORT_SYMBOLS_FLAGS="-Wl,--export-dynamic"
@@ -492,21 +439,12 @@ AC_SUBST(CLASSPATH_INSTALL_DIR)
 dnl now configure subpackages
 dnl the export is not my favorite (is there another way?)
 export CFLAGS
-if test x"${DISABLE_GC}" = "xno"; then
-       AC_CONFIG_SUBDIRS(src/boehm-gc)
-fi
-
-if test x"${ENABLE_STATICVM}" = "xno"; then
-       AC_CONFIG_SUBDIRS(src/libltdl)
-fi
-
-if test x"${ENABLE_INTRP}" = "xyes"; then
-       AC_CONFIG_SUBDIRS(src/libffi)
-fi
-
+AC_CONFIG_SUBDIRS(src/boehm-gc src/libltdl src/libffi)
 
 AC_CONFIG_FILES([Makefile]
                [contrib/Makefile]
+               [contrib/setenvinstalled]
+               [contrib/setenvsource]
                [doc/Makefile]
                [doc/handbook/Makefile]
                [man/Makefile]
@@ -522,9 +460,7 @@ AC_CONFIG_FILES([Makefile]
                [src/native/tools/Makefile]
                [src/native/vm/Makefile]
                [src/scripts/Makefile]
-               [src/scripts/cacao]
                [src/scripts/java]
-               [src/scripts/javac]
                [src/scripts/rmiregistry]
                [src/threads/Makefile]
                [src/threads/green/Makefile]
@@ -541,6 +477,7 @@ AC_CONFIG_FILES([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]