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"
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])
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)
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"
;;
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
[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]
[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