* src/vm/jit/powerpc/codegen.c: Changed OUTVAR to INOUT.
[cacao.git] / configure.ac
index 7e76c2520377e8e6354b0f27647f886258a716a6..94b76138227aad929ca95c4c786e9c7d6598f479 100644 (file)
@@ -75,6 +75,12 @@ esac
 
 dnl host type
 case "$host_os" in
+*cygwin* )
+    OS_DIR="cygwin"
+    INTRP_CFLAGS="$ARCH_CFLAGS -D__WINDOWS__ -D__CYGWIN__ -Wall -Wno-long-long"
+    ARCH_CFLAGS="$ARCH_CFLAGS -D__WINDOWS__ -D__CYGWIN__ -ansi -pedantic -Wall -Wno-long-long"
+    ;;
+
 *darwin* )
     OS_DIR="darwin"
     INTRP_CFLAGS="$ARCH_CFLAGS -D__DARWIN__ -Wall -Wno-long-long"
@@ -110,10 +116,12 @@ case "$host_os" in
 esac
 
 
-dnl temporary set the CFLAGS for configure tests
+dnl temporary set the CFLAGS for configure tests (e.g. inline keyword)
 dnl we set it properly at the end of this file
 CFLAGS="$ARCH_CFLAGS $OPT_CFLAGS"
 
+dnl set interpreter flags
+AC_SUBST(INTRP_CFLAGS)
 
 dnl define some stuff required for --fullversion
 AC_DEFINE_UNQUOTED(VERSION_CONFIGURE_ARGS, "$ac_configure_args", [configure arguments])
@@ -125,7 +133,6 @@ 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(INTRP_CFLAGS)
 AC_SUBST(USE_SCHEDULER)
 
 
@@ -170,10 +177,10 @@ dnl Checks for library functions.
 AC_PROG_GCC_TRADITIONAL
 AC_TYPE_SIGNAL
 AC_FUNC_MEMCMP
-AC_CHECK_FUNCS([calloc mprotect getpagesize free])
+AC_FUNC_MMAP
+AC_CHECK_FUNCS([calloc mmap getpagesize free])
 AC_CHECK_FUNCS([getcwd gettimeofday])
 AC_CHECK_FUNCS([scandir])
-AC_CHECK_FUNCS([mmap])
 AC_CHECK_FUNCS([isnan])
 
 dnl Checks for libraries.
@@ -192,6 +199,17 @@ fi
 AC_DEFINE_UNQUOTED([CACAO_PREFIX], "${CACAO_PREFIX}", [installation prefix])
 AC_SUBST(CACAO_PREFIX)
 
+dnl define libdir prefix
+if test "x$libdir" = "xNONE"; then
+    CACAO_LIBDIR=$ac_default_libdir
+else
+    CACAO_LIBDIR=$libdir
+fi
+dnl expand CACAO_LIBDIR to something that is usable in C code
+AS_AC_EXPAND([CACAO_LIBDIR], ${CACAO_LIBDIR})
+AC_DEFINE_UNQUOTED([CACAO_LIBDIR], "${CACAO_LIBDIR}", [library installation prefix])
+AC_SUBST(CACAO_LIBDIR)
+
 
 dnl Features
 
@@ -480,12 +498,12 @@ native | posix | pthreads)
     
     AC_MSG_RESULT(yes, native)
     AC_CHECK_LIB(pthread, main)
-    
+
     ARCH_CFLAGS="$ARCH_CFLAGS -D_REENTRANT"
 
     dnl we changed ARCH_CFLAGS, set CFLAGS again
     CFLAGS="$ARCH_CFLAGS $OPT_CFLAGS"
-    
+
     dnl tell boehm to support threads as well
     ac_configure_args="$ac_configure_args --enable-boehm-threads=posix"
     ;;
@@ -567,6 +585,24 @@ if test x"${ENABLE_LOOP}" = "xyes"; then
 fi
 
 
+dnl check if linear scan register allocator(lsra) with SSA should be used
+AC_MSG_CHECKING(whether lsra with ssa should be supported)
+AC_ARG_ENABLE([ssa],
+              [AS_HELP_STRING(--disable-ssa,disable ssa [[default=no]])],
+              [case "${enableval}" in
+                   no) ENABLE_SSA=no;;
+                   *) ENABLE_SSA=yes;;
+               esac],
+              [ENABLE_SSA=no])
+AC_MSG_RESULT(${ENABLE_SSA})
+AM_CONDITIONAL([ENABLE_SSA], test x"${ENABLE_SSA}" = "xyes")
+
+if test x"${ENABLE_SSA}" = "xyes"; then
+    AC_DEFINE([ENABLE_SSA], 1, [enable lsra with ssa])
+    ENABLE_LSRA="no"
+fi
+
+
 dnl check if linear scan register allocator(lsra) should be used
 AC_MSG_CHECKING(whether lsra should be supported)
 AC_ARG_ENABLE([lsra],
@@ -576,9 +612,15 @@ AC_ARG_ENABLE([lsra],
                    *) ENABLE_LSRA=no;;
                esac],
               [ENABLE_LSRA=no])
+   
+if test x"${ENABLE_LSRA}" = "xyes"; then
+    if test x"${ENABLE_SSA}" = "xyes"; then
+        ENABLE_LSRA="no"
+    fi
+fi
 AC_MSG_RESULT(${ENABLE_LSRA})
 AM_CONDITIONAL([ENABLE_LSRA], test x"${ENABLE_LSRA}" = "xyes")
-   
 if test x"${ENABLE_LSRA}" = "xyes"; then
     AC_DEFINE([ENABLE_LSRA], 1, [enable lsra])
 fi
@@ -777,12 +819,6 @@ AC_PROG_JAVAC
 AC_PROG_JAR
 
 
-dnl now configure subpackages
-dnl the export is not my favorite (is there another way?)
-export CFLAGS
-AC_CONFIG_SUBDIRS(src/boehm-gc)
-
-
 dnl finally pass CFLAGS to Makefiles via AM_CFLAGS
 CFLAGS=$OPT_CFLAGS
 AM_CFLAGS=$ARCH_CFLAGS
@@ -822,6 +858,8 @@ AC_CONFIG_FILES([Makefile]
                [src/vm/jit/alpha/freebsd/Makefile]
                [src/vm/jit/alpha/linux/Makefile]
                [src/vm/jit/i386/Makefile]
+               [src/vm/jit/i386/cygwin/Makefile]
+               [src/vm/jit/i386/darwin/Makefile]
                [src/vm/jit/i386/freebsd/Makefile]
                [src/vm/jit/i386/linux/Makefile]
                [src/vm/jit/ifconv/Makefile]
@@ -831,6 +869,7 @@ AC_CONFIG_FILES([Makefile]
                [src/vm/jit/mips/Makefile]
                [src/vm/jit/mips/irix/Makefile]
                [src/vm/jit/mips/linux/Makefile]
+                [src/vm/jit/optimizing/Makefile]
                [src/vm/jit/powerpc/Makefile]
                [src/vm/jit/powerpc/darwin/Makefile]
                [src/vm/jit/powerpc/linux/Makefile]
@@ -847,8 +886,16 @@ AC_CONFIG_FILES([Makefile]
                [tests/Makefile]
                [tests/regression/Makefile]
                [tests/regression/codepatching/Makefile]
+               [tests/regression/jasmin/Makefile]
                [tests/regression/native/Makefile])
 
+
+dnl now configure subpackages with OPT_CFLAGS and ARCH_CFLAGS
+export OPT_CFLAGS
+export ARCH_CFLAGS
+AC_CONFIG_SUBDIRS(src/boehm-gc)
+
+
 AC_OUTPUT