host_win32=yes
if test "x$cross_compiling" = "xno"; then
target_win32=yes
- if test "x$host" == "x$target"; then
+ if test "x$host" == "x$build"; then
AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32])
fi
CC="gcc -mno-cygwin -g"
# So libgc configure gets -mno-cygwin
export CC
export CXX
+ CFLAGS_FOR_EGLIB="$CFLAGS_FOR_EGLIB -mno-cygwin"
else
target_win32=yes
AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32/MinGW])
],[
AC_MSG_RESULT(Using system zlib)
zlib_msg="system zlib"
+ AC_DEFINE(HAVE_SYS_ZLIB,1,[Have system zlib])
],[
AC_MSG_RESULT(Using embedded zlib)
have_zlib=no
AC_SUBST(BUILD_GLIB_CFLAGS)
AC_SUBST(BUILD_GLIB_LIBS)
-if test x$cross_compiling$host_win32 = xnoyes; then
- AC_MSG_CHECKING(for cygwin glib2-dev package)
- if [ cygcheck --f /usr/lib/libglib-2.0.dll.a | grep -q glib2-devel ]; then
- AC_MSG_RESULT(found)
- AC_MSG_ERROR([Mono cannot be built with the cygwin glib2-devel package installed, because that package doesn't work with -mno-cygwin. Please uninstall it then re-run configure.])
- else
- AC_MSG_RESULT(not found, ok)
- fi
-
- AC_MSG_CHECKING(for broken gwin32.h)
- glib_include=`$PKG_CONFIG --cflags-only-I glib-2.0 | sed -e 's/ -I.*//g' | sed -e 's/-I//g'`
- if test -f $glib_include/glib/gwin32.h; then
- if [ grep ftruncate $glib_include/glib/gwin32.h | grep -q define ]; then
- AC_MSG_RESULT(failed)
- hashmark='#'
- AC_MSG_ERROR([Your version of gwin32.h is broken and will cause compilation errors when building mono. Please fix it by deleting the line: '$hashmark define ftruncate...' from '$glib_include/glib/gwin32.h' then re-run configure.])
- fi
- fi
- AC_MSG_RESULT(ok)
-fi
-
AC_ARG_WITH(gc, [ --with-gc=boehm,included,none Controls the Boehm GC config, default=included],[gc=$with_gc],[gc=$gc_default])
# Enable support for fast thread-local storage
AC_CHECK_FUNCS(getpriority)
AC_CHECK_FUNCS(setpriority)
AC_CHECK_FUNCS(dl_iterate_phdr)
+ AC_CHECK_FUNCS(dladdr)
AC_CHECK_FUNCS(sysconf)
AC_CHECK_FUNCS(sched_setaffinity)
+ AC_CHECK_FUNCS(sched_getcpu)
dnl ****************************************************************
dnl *** Check for sched_setaffinity from glibc versions before ***
AC_CHECK_FUNCS(round)
AC_CHECK_FUNCS(rint)
+AC_CHECK_FUNCS(execvp)
dnl ****************************
dnl *** Look for /dev/random ***
AC_MSG_RESULT($try_dev_random)
-case "{$target}" in
+case "{$build}" in
*-openbsd*)
NAME_DEV_RANDOM="/dev/srandom"
;;
dnl *** LLVM ***
dnl **************
-AC_ARG_ENABLE(llvm,[ --enable-llvm Enable the experimental LLVM back-end], enable_llvm=$enableval, enable_llvm=no)
+AC_ARG_ENABLE(llvm,[ --enable-llvm Enable the LLVM back-end], enable_llvm=$enableval, enable_llvm=no)
AC_ARG_ENABLE(loadedllvm,[ --enable-loadedllvm Load the LLVM back-end dynamically], enable_llvm=$enableval && enable_loadedllvm=$enableval, enable_loadedllvm=no)
if test "x$enable_llvm" = "xyes"; then
dnl
dnl Simple Generational checks (sgen)
dnl
+if $sgen_supported; then
+ build_sgen_default=yes
+else
+ build_sgen_default=no
+fi
SGEN_DEFINES=
-AC_ARG_WITH(sgen, [ --with-sgen=yes,no Extra Generational GC, default=yes],[buildsgen=$with_sgen],[buildsgen=yes])
+AC_ARG_WITH(sgen, [ --with-sgen=yes,no Extra Generational GC, default=yes],[buildsgen=$with_sgen],[buildsgen=$build_sgen_default])
if test x$buildsgen = xyes; then
if $sgen_supported; then
SGEN_DEFINES="-DHAVE_SGEN_GC -DHAVE_MOVING_COLLECTOR -DHAVE_WRITE_BARRIERS"