AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(mono,0.28.99)
+AM_INIT_AUTOMAKE(mono,0.30.99)
AM_MAINTAINER_MODE
dnl
AC_SUBST(libmono_cflags)
AC_SUBST(libmono_ldflags)
+dnl if linker handles the version script
+no_version_script=no
+
# Thread configuration inspired by sleepycat's db
AC_MSG_CHECKING([host platform characteristics])
libgc_threads=no
libmono_ldflags="-pthread"
AC_DEFINE(NEED_LINK_UNLINK)
AC_DEFINE(PTHREAD_POINTER_ID)
+ AC_DEFINE(USE_MACH_SEMA)
+ no_version_script=yes
libdl=
libgc_threads=no
gc_default=none
esac
AC_MSG_RESULT(ok)
AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
+AM_CONDITIONAL(NO_VERSION_SCRIPT, test x$no_version_script = xyes)
AC_CHECK_TOOL(CC, gcc, gcc)
AC_PROG_CC
WARN=''
if test x"$GCC" = xyes; then
WARN='-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
+ # The runtime code does not respect ANSI C strict aliasing rules
+ CFLAGS="$CFLAGS -fno-strict-aliasing"
else
# The Sun Forte compiler complains about inline functions that access static variables
# so disable all inlining.
# Enable support for NPTL only features like fast thread-local storage
# We can't reliably detect nptl at compile & run time
# so this option will stay until nptl becomes more widespread
-AC_ARG_WITH(nptl, [ --with-nptl Enable support for NPTL])
+AC_ARG_WITH(nptl, [ --with-nptl=yes,no enable/disable support for NPTL],[],[with_nptl=yes])
+
+# Enable support for using sigaltstack for SIGSEGV and stack overflow handling
+# This does not work on some platforms (bug #55253)
+AC_ARG_WITH(sigaltstack, [ --with-sigaltstack=yes,no enable/disable support for sigaltstack],[],[with_sigaltstack=yes])
+
+if test x$with_sigaltstack = "xyes"; then
+ AC_DEFINE(HAVE_WORKING_SIGALTSTACK)
+fi
# assembly bundle support, see metadata/make-bundle.pl for more info
AC_ARG_WITH(bundle, [ --with-bundle=bundle_template],[
if test "x$found_gcj_malloc" = "xyes"; then
AC_DEFINE(HAVE_GC_GCJ_MALLOC)
fi
+ AC_CHECK_LIB(gc, GC_enable, found_gc_enable="yes",,$libdl)
+ if test "x$found_gc_enable" = "xyes"; then
+ AC_DEFINE(HAVE_GC_ENABLE)
+ fi
;;
xincluded)
# The included libgc contains GCJ support
AC_DEFINE(HAVE_GC_GCJ_MALLOC)
+ AC_DEFINE(HAVE_GC_ENABLE)
;;
xnone)
# Yes, we have it...
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETHOSTBYNAME2_R)
+ ], [
+ AC_MSG_RESULT(no)
])
dnl *****************************
return !(res1 + res2 == 2);
}
], [
- if test "x$with_nptl" = "x"; then
+ if test "x$with_nptl" != "xyes"; then
AC_MSG_RESULT(disabled)
else
AC_MSG_RESULT(yes)
dnl ********************************
dnl *** Checks for semaphore lib ***
dnl ********************************
- AC_CHECK_LIB(rt, sem_init, LIBS="$LIBS -lrt")
+ # 'Real Time' functions on Solaris
+ # posix4 on Solaris 2.6
+ # pthread (first!) on Linux
+ AC_SEARCH_LIBS(sem_init, pthread rt posix4)
dnl ********************************
dnl *** Checks for timezone stuff **
dnl *** Check for signbit ***
dnl *************************
AC_MSG_CHECKING(for signbit)
- AC_TRY_COMPILE([#include <math.h>], [
+ AC_TRY_LINK([#include <math.h>], [
int s = signbit(1.0);
], [
AC_MSG_RESULT(yes)
AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?))
fi
+dnl socklen_t check
+AC_MSG_CHECKING(for socklen_t)
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+],[
+ socklen_t foo;
+],[
+ac_cv_c_socklen_t=yes
+ AC_DEFINE(HAVE_SOCKLEN_T)
+ AC_MSG_RESULT(yes)
+],[
+ AC_MSG_RESULT(no)
+])
+
+AC_CHECK_FUNCS(truncl, , AC_MSG_CHECKING(for truncl in math.h)
+ AC_TRY_LINK([#include <math.h>],
+ [ truncl(0.0); ],
+ [
+ AC_DEFINE(HAVE_TRUNCL)
+ AC_MSG_RESULT(yes)
+ ac_cv_truncl=yes
+ ],
+ AC_MSG_RESULT(no)))
+
+if test "x$ac_cv_truncl" != "xyes"; then
+ AC_CHECK_LIB(sunmath, aintl, [ AC_DEFINE(HAVE_AINTL) LIBS="$LIBS -lsunmath"])
+fi
+
dnl ****************************
dnl *** Look for /dev/random ***
dnl ****************************
AC_PATH_PROG(ICU_CONFIG, icu-config, no)
if test "x$ICU_CONFIG" = "xno" -o ! -x "$ICU_CONFIG"; then
AC_MSG_WARN([Only invariant locale available; install ICU for I18N support])
+ enable_icu="no, if you want full i18n support download it from: http://oss.software.ibm.com/icu/index.html"
else
enable_icu="yes. Version: `$ICU_CONFIG --version`"
AC_DEFINE(HAVE_ICU)
arch_target=x86;
JIT_SUPPORTED=yes
;;
+ x86_64-*-* | amd64-*-*)
+ TARGET=AMD64;
+ arch_target=amd64;
+ JIT_SUPPORTED=no
+ ;;
sparc*-*-*)
TARGET=SPARC;
arch_target=sparc;
+ #JIT_SUPPORTED=yes
ACCESS_UNALIGNED="no"
;;
# alpha*-*-linux* | alpha*-*-osf*)
;;
esac
+libsuffix=".so"
+
+case "$host" in
+ powerpc-*-darwin*)
+ libsuffix=".dylib"
+ ;;
+esac
+AC_SUBST(libsuffix)
+
if test ${TARGET} = ARM; then
dnl ******************************************
dnl *** Check to see what FPU is available ***
AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
AM_CONDITIONAL(X86, test x$TARGET = xX86)
+AM_CONDITIONAL(AMD64, test x$TARGET = xAMD64)
AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
AM_CONDITIONAL(IA64, test x$TARGET = xIA64)
AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
AC_OUTPUT([
Makefile
+mint.pc
mono.pc
mono/Makefile
mono/utils/Makefile
runtime/Makefile
scripts/Makefile
man/Makefile
-doc/Makefile
+web/Makefile
docs/Makefile
data/Makefile
samples/Makefile
GC: $gc
ICU: $enable_icu
+ NPTL: $with_nptl
+ SIGALTSTACK: $with_sigaltstack
"