. [$]{srcdir}/configure.host
+# We use a separate variable to pass down CPPFLAGS and CFLAGS from the main mono
+# configure, because of autoconf brokeness
+if test "x$CPPFLAGS_FOR_LIBGC" != "x"; then
+ CPPFLAGS=$CPPFLAGS_FOR_LIBGC
+fi
+if test "x$CFLAGS_FOR_LIBGC" != "x"; then
+ CFLAGS=$CFLAGS_FOR_LIBGC
+fi
+
GC_CFLAGS=${gc_cflags}
AC_SUBST(GC_CFLAGS)
case $enable_embed_check in
no) ;;
-*) AC_MSG_ERROR([This module is now part of `mono' and can't be built as a stand-alone module any longer.]) ;;
+*) AC_MSG_ERROR([This module is now part of 'mono' and cannot be built as a stand-alone module any longer.]) ;;
esac
THREADS=$with_libgc_threads
THREADS=posix
THREADDLLIBS=-lpthread
case "$host" in
- x86-*-linux* | ia64-*-linux* | i386-*-linux* | i486-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha-*-linux* | s390*-*-linux* | sparc*-*-linux* | powerpc-*-linux*)
+ x86-*-linux* | ia64-*-linux* | i386-*-linux* | i486-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* | alpha*-*-linux* | s390*-*-linux* | sparc*-*-linux* | powerpc-*-linux*)
AC_DEFINE(GC_LINUX_THREADS)
AC_DEFINE(_REENTRANT)
if test "${enable_parallel_mark}" = yes; then
AC_DEFINE(THREAD_LOCAL_ALLOC)
THREADDLLIBS="-lpthread -lrt"
;;
- *-*-freebsd4*)
- AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
+ *-*-freebsd*)
AC_DEFINE(GC_FREEBSD_THREADS)
- if test "x$PTHREAD_CFLAGS" = "x"; then
- INCLUDES="$INCLUDES -pthread"
- else
- INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
- fi
- if test "x$PTHREAD_LIBS" = "x"; then
- THREADDLLIBS=-pthread
- else
- THREADDLLIBS=$PTHREAD_LIBS
- fi
- ;;
- *-*-freebsd5*)
- AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
- AC_DEFINE(GC_FREEBSD_THREADS)
- INCLUDES="$INCLUDES -pthread"
- THREADDLLIBS=-pthread
- ;;
- *-*-freebsd6*)
- AC_DEFINE(GC_FREEBSD_THREADS)
- if test "x$PTHREAD_CFLAGS" != "x"; then
+ if test "x$PTHREAD_CFLAGS" != "x"; then
INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
fi
if test "x$PTHREAD_LIBS" = "x"; then
AC_DEFINE(PARALLEL_MARK)
fi
;;
+ *-*-netbsd*)
+ AC_DEFINE(GC_NETBSD_THREADS)
+ if test "${enable_parallel_mark}" = yes; then
+ AC_DEFINE(PARALLEL_MARK)
+ fi
+ AC_DEFINE(THREAD_LOCAL_ALLOC)
+ ;;
*-*-osf*)
AC_DEFINE(GC_OSF1_THREADS)
if test "${enable_parallel_mark}" = yes; then