# Process this file with autoconf to produce a configure script.
#AC_PREREQ([2.62])
-AC_INIT(mono, [3.99.0],
+AC_INIT(mono, [4.3.0],
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
AC_CONFIG_SRCDIR([README.md])
#
libgc_configure_args=
-if test -d $srcdir/libgc ; then
- libgc_default=included
-else
- libgc_default=boehm
-fi
-
# These variables are the CPPFLAGS/CFLAGS passed to libgc's configure
# libgc should inherit the original CFLAGS/CPPFLAGS passed to configure, i.e. -O0
CPPFLAGS_FOR_LIBGC=$CPPFLAGS
reloc_libdir=`basename ${libdir}`
AC_SUBST(reloc_libdir)
-dnl if linker handles the version script
-no_version_script=no
-
# Set to yes if Unix sockets cannot be created in an anonymous namespace
need_link_unlink=no
platform_darwin=no
case "$host" in
*-mingw*|*-*-cygwin*)
- AC_DEFINE(HOST_WIN32,1,[Host Platform is Win32])
AC_DEFINE(DISABLE_PORTABILITY,1,[Disable the io-portability layer])
AC_DEFINE(PLATFORM_NO_SYMLINKS,1,[This platform does not support symlinks])
host_win32=yes
mono_cv_clang=no
if test "x$cross_compiling" = "xno"; then
- target_win32=yes
if test "x$host" == "x$build" -a "x$host" == "x$target"; then
- AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32])
+ target_win32=yes
fi
else
- target_win32=yes
- AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32/MinGW])
- AC_DEFINE(MINGW_CROSS_COMPILE,1,[Cross-compiling using MinGW])
+ if test "x$host" == "x$target"; then
+ target_win32=yes
+ fi
fi
HOST_CC="gcc"
- # Windows XP SP2 is required
- CPPFLAGS="$CPPFLAGS -DWINVER=0x0502 -D_WIN32_WINNT=0x0502 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024"
+ # Windows Vista or later is required
+ CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -D_WIN32_WINNT=0x0600 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024"
LDFLAGS="$LDFLAGS -lmswsock -lws2_32 -lole32 -loleaut32 -lpsapi -lversion -ladvapi32 -lwinmm -lkernel32 -liphlpapi"
libmono_cflags="-mms-bitfields -mwindows"
libmono_ldflags="-mms-bitfields -mwindows"
libdl=
libgc_threads=win32
- libgc_default=included
with_sigaltstack=no
with_tls=pthread
LN_S=cp
need_link_unlink=yes
AC_DEFINE(PTHREAD_POINTER_ID)
libdl=
- libgc_default=boehm
libgc_threads=pthreads
with_sigaltstack=no
use_sigposix=yes
libmono_cflags="-D_REENTRANT"
libdl=
libgc_threads=pthreads
- libgc_default=boehm
use_sigposix=yes
ikvm_native=no
AC_DEFINE(DISABLE_SOCKETS,1,[Disable sockets support])
host_win32=no
platform_darwin=yes
target_mach=yes
- CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE -DGC_MACOSX_THREADS -DPLATFORM_MACOSX -DUSE_MMAP -DUSE_MUNMAP"
- CPPFLAGS="$CPPFLAGS -DGetCurrentProcess=MonoGetCurrentProcess -DGetCurrentThread=MonoGetCurrentThread -DCreateEvent=MonoCreateEvent"
+ CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_MACOSX_THREADS -DPLATFORM_MACOSX -DUSE_MMAP -DUSE_MUNMAP"
libmono_cflags="-D_THREAD_SAFE"
need_link_unlink=yes
AC_DEFINE(PTHREAD_POINTER_ID)
AC_DEFINE(USE_MACH_SEMA, 1, [...])
- no_version_script=yes
libdl=
libgc_threads=pthreads
has_dtrace=yes
AC_DEFINE(NEED_LINK_UNLINK, 1, [Define if Unix sockets cannot be created in an anonymous namespace])
fi
+if test x$host_win32 = xyes; then
+ AC_DEFINE(HOST_WIN32, 1, [Host Platform is Win32])
+fi
+
+if test x$target_win32 = xyes; then
+ AC_DEFINE(TARGET_WIN32, 1, [Target Platform is Win32])
+fi
+
AC_SUBST(extra_runtime_ldflags)
AM_CONDITIONAL(HOST_WIN32, test x$host_win32 = xyes)
AM_CONDITIONAL(TARGET_WIN32, test x$target_win32 = xyes)
# Test whenever ld supports -version-script
AC_PROG_LD
AC_PROG_LD_GNU
-if test "x$lt_cv_prog_gnu_ld" = "xno"; then
- no_version_script=yes
-fi
AM_ICONV()
-AM_CONDITIONAL(NO_VERSION_SCRIPT, test x$no_version_script = xyes)
-
-AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h sys/uio.h sys/param.h libproc.h)
-AC_CHECK_HEADERS(sys/param.h sys/socket.h sys/ipc.h sys/sem.h sys/utsname.h alloca.h ucontext.h pwd.h sys/select.h netinet/tcp.h netinet/in.h unistd.h sys/types.h link.h asm/sigcontext.h sys/inotify.h)
+AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h sys/uio.h sys/param.h sys/sysctl.h libproc.h sys/prctl.h)
+AC_CHECK_HEADERS(sys/param.h sys/socket.h sys/ipc.h sys/sem.h sys/utsname.h alloca.h ucontext.h pwd.h sys/select.h netinet/tcp.h netinet/in.h unistd.h sys/types.h link.h asm/sigcontext.h sys/inotify.h arpa/inet.h complex.h)
AC_CHECK_HEADERS([linux/netlink.h linux/rtnetlink.h],
[], [], [#include <stddef.h>
#include <sys/socket.h>
#endif
])
+AC_CHECK_HEADERS(linux/serial.h)
+
AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
if test x$have_zlib = xyes; then
AC_TRY_COMPILE([#include <zlib.h>], [
[])
])
+AC_ARG_ENABLE(visibility-hidden,
+[ --disable-visibility-hidden disable usage of -fvisiblity=hidden],
+ disable_visibility_hidden=yes, disable_visibility_hidden=no)
+
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 -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value'
+ WARN='-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value -Wno-attributes'
+
+ # We require C99 with some GNU extensions, e.g. `linux` macro
+ CFLAGS="$CFLAGS -std=gnu99"
+
# The runtime code does not respect ANSI C strict aliasing rules
CFLAGS="$CFLAGS -fno-strict-aliasing"
# We rely on signed overflow to behave
CFLAGS="$CFLAGS -fwrapv"
- ORIG_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -Wdeclaration-after-statement"
- AC_MSG_CHECKING(for -Wdeclaration-after-statement option to gcc)
- AC_TRY_COMPILE([],[
- return 0;
- ], [
- AC_MSG_RESULT(yes)
- ], [
- AC_MSG_RESULT(no)
- CFLAGS=$ORIG_CFLAGS
- ])
+ CFLAGS="$CFLAGS -DMONO_DLL_EXPORT"
+ if test x"$disable_visibility_hidden" = xno; then
+ # Don't export any symbols by default
+ SHARED_CFLAGS="-fvisibility=hidden"
+ CFLAGS_FOR_EGLIB="$CFLAGS_FOR_EGLIB -fvisibility=hidden"
+ CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
+ fi
ORIG_CFLAGS=$CFLAGS
# Check for the normal version, since gcc ignores unknown -Wno options
AC_SUBST([mcs_topdir])
AC_SUBST([mcs_topdir_from_srcdir])
-# Where's the 'olive' source tree?
-if test -d $srcdir/olive; then
- olivedir=olive
-else
- olivedir=../olive
-fi
-
-if test -d $srcdir/$olivedir; then
-olive_topdir='$(top_srcdir)/'$olivedir
-fi
-
# gettext: prepare the translation directories.
# we do not configure the full gettext, as we consume it dynamically from C#
AM_PO_SUBDIRS
WERROR_CFLAGS="-Werror"
fi
AC_SUBST([WERROR_CFLAGS])
+AC_SUBST([SHARED_CFLAGS])
ac_configure_args="$ac_configure_args \"CPPFLAGS_FOR_EGLIB=$EGLIB_CPPFLAGS\" \"CFLAGS_FOR_EGLIB=$CFLAGS_FOR_EGLIB\""
AC_CONFIG_SUBDIRS(eglib)
AC_DEFINE(ENABLE_GSHAREDVT,1,[Gsharing])
fi
+# A synonym
+AC_ARG_ENABLE(gsharedvt, [ --enable-gsharedvt Enable generic valuetype sharing], enable_gsharedvt=$enableval, enable_gsharedvt=no)
+if test x$enable_gsharedvt = xyes; then
+ AC_DEFINE(ENABLE_GSHAREDVT,1,[Gsharedvt])
+fi
+
AC_ARG_ENABLE(native-types, [ --enable-native-types Enable native types], enable_native_types=$enableval, enable_native_types=no)
if test x$enable_native_types = xyes; then
AC_DEFINE(MONO_NATIVE_TYPES,1,[native types])
dnl Boehm GC configuration
dnl
-AC_ARG_WITH(libgc, [ --with-gc=boehm,included,none Controls the Boehm GC config, default=included],[libgc=$with_gc],[libgc=$libgc_default])
+AC_ARG_WITH(libgc, [ --with-gc=included,none Controls the Boehm GC config, default=included],[libgc=$with_gc],[libgc=included])
AC_ARG_ENABLE(boehm, [ --disable-boehm Disable the Boehm GC.], support_boehm=$enableval,support_boehm=${support_boehm:-yes})
AM_CONDITIONAL(SUPPORT_BOEHM, test x$support_boehm = xyes)
libgc_configure_args="$libgc_configure_args --enable-parallel-mark"
fi
-gc_headers=no
gc_msg=""
-use_included_gc=no
LIBGC_CPPFLAGS=
LIBGC_LIBS=
LIBGC_STATIC_LIBS=
libgc_dir=
case "x$libgc" in
- xboehm|xbohem|xyes)
- AC_CHECK_HEADERS(gc.h gc/gc.h, gc_headers=yes)
- AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes",,$libdl)
-
- if test "x$found_boehm" != "xyes"; then
- AC_MSG_ERROR("GC requested but libgc not found! Install libgc or run configure with --with-gc=none.")
- fi
- if test "x$gc_headers" != "xyes"; then
- AC_MSG_ERROR("GC requested but header files not found! You may need to install them by hand.")
- fi
-
- LIBGC_LIBS="-lgc $libdl"
- LIBGC_STATIC_LIBS="$LIBGC_LIBS"
- libmono_ldflags="$libmono_ldflags -lgc"
- BOEHM_DEFINES="-DHAVE_BOEHM_GC"
-
- # AC_CHECK_FUNCS does not work for some reason...
- AC_CHECK_LIB(gc, GC_gcj_malloc, found_gcj_malloc="yes",,$libdl)
- if test "x$found_gcj_malloc" = "xyes"; then
- BOEHM_DEFINES="-DHAVE_GC_GCJ_MALLOC $BOEHM_DEFINES"
- AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "System Boehm (with typed GC)", [GC description])
- gc_msg="System Boehm with typed GC"
- else
- AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "System Boehm (no typed GC)", [GC description])
- gc_msg="System Boehm (without typed GC)"
- fi
- AC_CHECK_LIB(gc, GC_enable, found_gc_enable="yes",,$libdl)
- if test "x$found_gc_enable" = "xyes"; then
- BOEHM_DEFINES="-DHAVE_GC_ENABLE $BOEHM_DEFINES"
- fi
-
- # check whether we need to explicitly allow
- # thread registering
- AC_CHECK_LIB(gc, GC_allow_register_threads, found_allow_register_threads="yes",,$libdl)
- if test "x$found_allow_register_threads" = "xyes"; then
- AC_DEFINE(HAVE_GC_ALLOW_REGISTER_THREADS, 1, [GC requires thread registration])
- fi
- ;;
-
xincluded)
- use_included_gc=yes
if test "x$support_boehm" = "xyes"; then
libgc_dir=libgc
fi
LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la'
LIBGC_STATIC_LIBS='$(top_builddir)/libgc/libmonogc-static.la'
- BOEHM_DEFINES="-DHAVE_BOEHM_GC -DHAVE_GC_H -DUSE_INCLUDED_LIBGC -DHAVE_GC_GCJ_MALLOC -DHAVE_GC_ENABLE"
+ BOEHM_DEFINES="-DHAVE_BOEHM_GC"
if test x$target_win32 = xyes; then
BOEHM_DEFINES="$BOEHM_DEFINES -DGC_NOT_DLL"
fi
;;
+ xboehm|xbohem|xyes)
+ AC_MSG_WARN("External Boehm is no longer supported")
+ ;;
+
xsgen)
AC_MSG_WARN("Use --with-sgen instead, --with-gc= controls Boehm configuration")
;;
CPPFLAGS="$CPPFLAGS -DLARGE_CONFIG"
fi
-AM_CONDITIONAL(INCLUDED_LIBGC, test x$use_included_gc = xyes)
AC_SUBST(LIBGC_CPPFLAGS)
AC_SUBST(LIBGC_LIBS)
AC_SUBST(LIBGC_STATIC_LIBS)
AC_CHECK_HEADERS(nacl/nacl_dyncode.h)
-if test x$target_win32 = xno; then
+dnl ***********************************
+dnl *** Checks for signals
+dnl ***********************************
+AC_CHECK_HEADERS(signal.h)
+AC_CHECK_FUNCS(sigaction)
+AC_CHECK_FUNCS(kill)
+AC_CHECK_FUNCS(signal)
+
+if test x$host_win32 = xno; then
dnl hires monotonic clock support
AC_SEARCH_LIBS(clock_gettime, rt)
AC_CHECK_FUNCS(dladdr)
AC_CHECK_FUNCS(sysconf)
AC_CHECK_FUNCS(getrlimit)
+ AC_CHECK_FUNCS(prctl)
AC_CHECK_FUNCS(sched_setaffinity)
AC_CHECK_FUNCS(sched_getcpu)
])
])
+ dnl **********************************
+ dnl *** Check for getaddrinfo ***
+ dnl **********************************
+ AC_MSG_CHECKING(for getaddrinfo)
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <netdb.h>
+ ], [
+ getaddrinfo(NULL,NULL,NULL,NULL);
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GETADDRINFO, 1, [Have getaddrinfo])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+
dnl **********************************
dnl *** Check for gethostbyname2_r ***
dnl **********************************
AC_MSG_CHECKING(for gethostbyname2_r)
- AC_TRY_LINK([#include <netdb.h>], [
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <netdb.h>
+ ], [
+
gethostbyname2_r(NULL,0,NULL,NULL,0,NULL,NULL);
], [
# Yes, we have it...
AC_MSG_RESULT(no)
])
+ dnl **********************************
+ dnl *** Check for gethostbyname2 ***
+ dnl **********************************
+ AC_MSG_CHECKING(for gethostbyname2)
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <netdb.h>
+ ], [
+ gethostbyname2(NULL,0);
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GETHOSTBYNAME2, 1, [Have gethostbyname2])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+
+ dnl **********************************
+ dnl *** Check for gethostbyname ***
+ dnl **********************************
+ AC_MSG_CHECKING(for gethostbyname)
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <netdb.h>
+ ], [
+ gethostbyname(NULL);
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GETHOSTBYNAME, 1, [Have gethostbyname])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+
+ dnl **********************************
+ dnl *** Check for getprotobyname ***
+ dnl **********************************
+ AC_MSG_CHECKING(for getprotobyname)
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <netdb.h>
+ ], [
+ getprotobyname(NULL);
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GETPROTOBYNAME, 1, [Have getprotobyname])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+
+ dnl **********************************
+ dnl *** Check for getnameinfo ***
+ dnl **********************************
+ AC_MSG_CHECKING(for getnameinfo)
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <netdb.h>
+ ], [
+ getnameinfo (NULL, 0, NULL, 0, NULL, 0, 0);
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GETNAMEINFO, 1, [Have getnameinfo])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+
+
+ dnl **********************************
+ dnl *** Check for inet_ntop ***
+ dnl **********************************
+ AC_MSG_CHECKING(for inet_ntop)
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <arpa/inet.h>
+ ], [
+ inet_ntop (0, NULL, NULL, 0);
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_INET_NTOP, 1, [Have inet_ntop])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+
dnl *****************************
dnl *** Checks for libnsl ***
dnl *****************************
AC_CHECK_FUNCS(pthread_attr_getstack pthread_attr_getstacksize)
AC_CHECK_FUNCS(pthread_get_stacksize_np pthread_get_stackaddr_np)
- dnl ***********************************
- dnl *** Checks for signals
- dnl ***********************************
- AC_CHECK_HEADERS(signal.h)
- AC_CHECK_FUNCS(sigaction)
+ dnl **********************************
+ dnl *** Check for mincore ***
+ dnl **********************************
+ AC_MSG_CHECKING(for mincore)
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/mman.h>
+ ], [
+ mincore(NULL, 0, NULL);
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_MINCORE, 1, [Have mincore])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
dnl ***********************************
dnl *** Checks for working __thread ***
AC_CHECK_FUNCS(fstatat mknodat readlinkat)
AC_CHECK_FUNCS(readv writev preadv pwritev)
AC_CHECK_FUNCS(setpgid)
+ AC_CHECK_FUNCS(system)
AC_CHECK_SIZEOF(size_t)
AC_CHECK_TYPES([blksize_t], [AC_DEFINE(HAVE_BLKSIZE_T)], ,
[#include <sys/types.h>
AC_MSG_RESULT(no)
])
])
+
+ dnl **********************************
+ dnl *** Check for getaddrinfo ***
+ dnl **********************************
+ AC_MSG_CHECKING(for getaddrinfo)
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ ], [
+ getaddrinfo(NULL,NULL,NULL,NULL);
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GETADDRINFO, 1, [Have getaddrinfo])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+
+ dnl **********************************
+ dnl *** Check for gethostbyname ***
+ dnl **********************************
+ AC_MSG_CHECKING(for gethostbyname)
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ ], [
+ gethostbyname(NULL);
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GETHOSTBYNAME, 1, [Have gethostbyname])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+
+ dnl **********************************
+ dnl *** Check for getprotobyname ***
+ dnl **********************************
+ AC_MSG_CHECKING(for getprotobyname)
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ ], [
+ getprotobyname(NULL);
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GETPROTOBYNAME, 1, [Have getprotobyname])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+
+ dnl **********************************
+ dnl *** Check for getnameinfo ***
+ dnl **********************************
+ AC_MSG_CHECKING(for getnameinfo)
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ ], [
+ getnameinfo (NULL, 0, NULL, 0, NULL, 0, 0);
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GETNAMEINFO, 1, [Have getnameinfo])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+
+ dnl **********************************
+ dnl *** Check for inet_ntop ***
+ dnl **********************************
+ AC_MSG_CHECKING(for inet_ntop)
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ ], [
+ inet_ntop (0, NULL, NULL, 0);
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_INET_NTOP, 1, [Have inet_ntop])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+
+ dnl **********************************
+ dnl *** Check for inet_pton ***
+ dnl **********************************
+ AC_MSG_CHECKING(for inet_pton)
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ ], [
+ inet_pton (0, NULL, NULL);
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_INET_PTON, 1, [Have inet_pton])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+
AC_CHECK_DECLS(InterlockedExchange64, [], [], [[#include <windows.h>]])
AC_CHECK_DECLS(InterlockedCompareExchange64, [], [], [[#include <windows.h>]])
AC_CHECK_DECLS(InterlockedDecrement64, [], [], [[#include <windows.h>]])
AC_MSG_CHECKING([if inter-process shared handles are requested])
# Same as --enable-minimal=shared_handles
-AC_ARG_ENABLE(shared-handles, [ --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=yes)
+AC_ARG_ENABLE(shared-handles, [ --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=no)
AC_MSG_RESULT($try_shared_handles)
if test "x$try_shared_handles" != "xyes"; then
AC_DEFINE(DISABLE_SHARED_HANDLES, 1, [Disable inter-process shared handles])
AC_ARG_ENABLE(bcl-opt, [ --disable-bcl-opt BCL is compiled with no optimizations (allows accurate BCL debugging)], test_bcl_opt=$enableval, test_bcl_opt=yes)
+AC_ARG_ENABLE(perf-events, [ --enable-perf-events Enable using `perf` for profiling on Linux], test_perf_events=$enableval, test_perf_events=no)
+if test "x$test_perf_events" == "xyes"; then
+ AC_DEFINE(ENABLE_PERF_EVENTS, 1, [Enable using `perf` for profiling on Linux])
+ AC_SUBST(ENABLE_PERF_EVENTS)
+fi
+
AC_MSG_CHECKING([if big-arrays are to be enabled])
AC_ARG_ENABLE(big-arrays, [ --enable-big-arrays Enable the allocation and indexing of arrays greater than Int32.MaxValue], enable_big_arrays=$enableval, enable_big_arrays=no)
if test "x$enable_big_arrays" = "xyes" ; then
if test "x$enable_llvm" = "xyes"; then
if test "x$with_llvm" != "x"; then
LLVM_CONFIG=$with_llvm/bin/llvm-config
+ if test x$host_win32 = xyes; then
+ LLVM_CONFIG=$LLVM_CONFIG.exe
+ fi
if test ! -x $LLVM_CONFIG; then
AC_MSG_ERROR([LLVM executable $LLVM_CONFIG not found.])
fi
;;
esac
+ if test "x$host_win32" = "xno"; then
+
# The output of --cflags seems to include optimizations flags too
LLVM_CFLAGS=`$LLVM_CONFIG --cflags | sed -e 's/-O2//g' | sed -e 's/-O0//g' | sed -e 's/-fomit-frame-pointer//g' | sed -e 's/-fPIC//g'`
# LLVM is compiled with -fno-rtti, so we need this too, since our classes inherit
AC_MSG_ERROR([Expected llvm version $expected_llvm_version, but llvm-config --version returned $llvm_version"])
fi
fi
- if test "x$llvm_api_version" = "x"; then
- LLVM_CFLAGS="$LLVM_CFLAGS -DLLVM_API_VERSION=0"
- LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_API_VERSION=0"
- else
- LLVM_CFLAGS="$LLVM_CFLAGS -DLLVM_API_VERSION=$llvm_api_version"
- LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_API_VERSION=$llvm_api_version"
- fi
else
AC_MSG_ERROR([Compiling with stock LLVM is not supported, please use the Mono LLVM repo at https://github.com/mono/llvm, with the GIT branch which matches this version of mono, i.e. 'mono-2-10' for Mono 2.10.])
fi
+ else
+ LLVM_CFLAGS="-I$with_llvm/include -DNDEBUG -D__NO_CTYPE_INLINE -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
+ LLVM_CXXFLAGS="$LLVM_CFLAGS -std=gnu++11 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -Woverloaded-virtual -Wcast-qual"
+ LLVM_LDFLAGS="-L$with_llvm/lib"
+ LLVM_SYSTEM_LIBS="-lshell32 -lpsapi -limagehlp -ldbghelp -lm"
+ LLVM_LIBS="-lLLVMLTO -lLLVMObjCARCOpts -lLLVMLinker -lLLVMipo -lLLVMVectorize -lLLVMBitWriter \
+ -lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo \
+ -lLLVMARMAsmPrinter -lLLVMTableGen -lLLVMDebugInfo -lLLVMOption -lLLVMX86Disassembler \
+ -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86Desc \
+ -lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMJIT \
+ -lLLVMIRReader -lLLVMAsmParser -lLLVMLineEditor -lLLVMMCAnalysis -lLLVMInstrumentation \
+ -lLLVMInterpreter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils \
+ -lLLVMipa -lLLVMAnalysis -lLLVMProfileData -lLLVMMCJIT -lLLVMTarget -lLLVMRuntimeDyld \
+ -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMExecutionEngine -lLLVMMC -lLLVMCore \
+ -lLLVMSupport -lstdc++"
+ LLVM_LIBS="$LLVM_LIBS $LLVM_SYSTEM_LIBS"
+
+ llvm_config_path=$with_llvm/include/llvm/Config/llvm-config.h
+ llvm_api_version=`awk '/MONO_API_VERSION/ { print $3 }' $llvm_config_path`
+ fi
+
+ if test "x$llvm_api_version" = "x"; then
+ LLVM_CFLAGS="$LLVM_CFLAGS -DLLVM_API_VERSION=0"
+ LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_API_VERSION=0"
+ else
+ LLVM_CFLAGS="$LLVM_CFLAGS -DLLVM_API_VERSION=$llvm_api_version"
+ LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_API_VERSION=$llvm_api_version"
+ fi
+
AC_DEFINE_UNQUOTED(LLVM_VERSION, "$llvm_version", [Full version of LLVM libraties])
AC_SUBST(LLVM_CFLAGS)
with_tls=pthread
target_mach=no
;;
+ x86_64*-linux-*)
+ TARGET=AMD64;
+ arch_target=amd64;
+ AC_DEFINE(TARGET_AMD64, 1, [...])
+ AC_DEFINE(TARGET_ANDROID, 1, [...])
+ CPPFLAGS="$CPPFLAGS"
+ sgen_supported=true
+ # Can't use tls, since it depends on the runtime detection of tls offsets
+ # in mono-compiler.h
+ with_tls=pthread
+ target_mach=no
+ ;;
+ x86_64-ps4-freebsd)
+ TARGET=AMD64;
+ arch_target=amd64;
+ AC_DEFINE(TARGET_AMD64, 1, [...])
+ AC_DEFINE(TARGET_PS4, 1, [...])
+ CPPFLAGS="$CPPFLAGS"
+ sgen_supported=true
+ # Can't use tls, since it depends on the runtime detection of tls offsets
+ # in mono-compiler.h
+ with_tls=pthread
+ target_mach=no
+ target_win32=no
+ ;;
aarch64*-linux-*)
TARGET=ARM64;
arch_target=arm64;
;;
esac
+dnl *************
+dnl *** VTUNE ***
+dnl *************
+
+AC_ARG_ENABLE(vtune,[ --enable-vtune Enable the VTUNE back-end], enable_vtune=$enableval, enable_vtune=no)
+AC_ARG_WITH(vtune, [ --with-vtune=<vtune prefix> Enable jit vtune profiling], enable_vtune=yes,)
+
+AM_CONDITIONAL(HAVE_VTUNE, test x$enable_vtune = xyes)
+
+if test "x$enable_vtune" = "xyes"; then
+ if test "x$with_vtune" = "x"; then
+ VTUNE_PATH=/opt/intel/vtune_amplifier_xe
+ else
+ VTUNE_PATH=$with_vtune
+ fi
+ VTUNE_INCLUDE=$VTUNE_PATH/include
+ case "$TARGET" in
+ X86)
+ VTUNE_LIB=$VTUNE_PATH/lib32
+ ;;
+ AMD64)
+ VTUNE_LIB=$VTUNE_PATH/lib64
+ ;;
+ *)
+ AC_MSG_ERROR([Unsupported target $TARGET for VTUNE.])
+ ;;
+ esac
+ if test ! -f $VTUNE_INCLUDE/jitprofiling.h; then
+ AC_MSG_ERROR([VTUNE $VTUNE_INCLUDE/jitprofiling.h not found.])
+ fi
+ if test ! -f $VTUNE_LIB/libjitprofiling.a; then
+ AC_MSG_ERROR([VTUNE $VTUNE_LIB/libjitprofiling.a not found.])
+ fi
+
+ VTUNE_CFLAGS=-I$VTUNE_INCLUDE
+ VTUNE_LIBS="-L/$VTUNE_LIB/ -ljitprofiling"
+
+ AC_SUBST(VTUNE_LIBS)
+ AC_SUBST(VTUNE_CFLAGS)
+fi
dnl Use GCC atomic ops if they work on the target.
if test x$GCC = "xyes"; then
case $TARGET in
X11="libX11.so.6"
;;
*-*-*freebsd*)
- LIBC="libc.so"
+ LIBC="libc.so.7"
INTL="libintl.so"
SQLITE="libsqlite.so"
SQLITE3="libsqlite3.so"
;;
esac
-AC_ARG_WITH(profile2, [ --with-profile2=yes,no If you want to install the 2.0/3.5 FX (defaults to yes)], [], [with_profile2=no])
-AC_ARG_WITH(profile4, [ --with-profile4=yes,no If you want to install the 4.0 FX (defaults to yes)], [], [with_profile4=yes])
-AC_ARG_WITH(profile4_5,[ --with-profile4_5=yes,no If you want to install the 4.5 FX (defaults to yes)], [], [with_profile4_5=yes])
+AC_ARG_WITH(profile4_x,[ --with-profile4=yes,no If you want to install the 4.6 FX (defaults to yes)], [], [with_profile4_x=yes])
AC_ARG_WITH(monodroid, [ --with-monodroid=yes,no If you want to build the MonoDroid assemblies (defaults to no)], [], [with_monodroid=no])
-AC_ARG_WITH(monotouch, [ --with-monotouch=yes,no,only If you want to build the MonoTouch assemblies (defaults to no)], [], [with_monotouch=no])
-AC_ARG_WITH(xammac, [ --with-xammac=yes,no,only If you want to build the Xamarin.Mac assemblies (defaults to no)], [], [with_xammac=no])
+AC_ARG_WITH(monotouch, [ --with-monotouch=yes,no If you want to build the Xamarin.iOS assemblies (defaults to no)], [], [with_monotouch=no])
+AC_ARG_WITH(xammac, [ --with-xammac=yes,no If you want to build the Xamarin.Mac assemblies (defaults to no)], [], [with_xammac=no])
OPROFILE=no
AC_ARG_WITH(oprofile,[ --with-oprofile=no,<oprofile install dir> Enable oprofile support (defaults to no)],[
DISABLE_MCS_DOCS=yes
fi
])
-if test x$with_profile4 != xyes; then
+if test x$with_profile4_x != xyes; then
DISABLE_MCS_DOCS=yes
fi
fi
], [with_lazy_gc_thread_creation=no])
+AC_ARG_WITH(cooperative_gc, [ --with-cooperative-gc=yes|no Enable cooperative stop-the-world garbage collection (sgen only) (defaults to no)],[
+ if test x$with_cooperative_gc != xno ; then
+ AC_DEFINE(USE_COOP_GC,1,[Enable cooperative stop-the-world garbage collection.])
+ fi
+], [with_cooperative_gc=no])
+
AC_CHECK_HEADER([malloc.h],
[AC_DEFINE([HAVE_USR_INCLUDE_MALLOC_H], [1],
[Define to 1 if you have /usr/include/malloc.h.])],,)
dnl
if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
DISABLE_MCS_DOCS=yes
- with_profile4=no
- with_profile4_5=no
+ with_profile4_x=no
with_monodroid=no
with_monotouch=no
with_xammac=no
libmono_ldflags="$libmono_ldflags $LIBS"
-AM_CONDITIONAL(INSTALL_4_0, [test "x$with_profile4" = xyes])
-AM_CONDITIONAL(INSTALL_4_5, [test "x$with_profile4_5" = xyes])
+AM_CONDITIONAL(INSTALL_4_x, [test "x$with_profile4_x" = xyes])
AM_CONDITIONAL(INSTALL_MONODROID, [test "x$with_monodroid" != "xno"])
AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" != "xno"])
AM_CONDITIONAL(INSTALL_XAMMAC, [test "x$with_xammac" != "xno"])
-AM_CONDITIONAL(ONLY_MONOTOUCH, [test "x$with_monotouch" = "xonly"])
-AM_CONDITIONAL(ONLY_XAMMAC, [test "x$with_xammac" = "xonly"])
AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
AM_CONDITIONAL(HOST_ARM64, test x$HOST = xARM64)
AM_CONDITIONAL(CROSS_COMPILE, test "x$host" != "x$target")
-AM_CONDITIONAL(INCLUDED_LIBGC, test x$libgc = xincluded)
-
AC_SUBST(LIBC)
AC_SUBST(INTL)
AC_SUBST(SQLITE)
fi
AC_SUBST(mono_cfg_dir)
+default_profile=net_4_x
+if test -z "$INSTALL_MONODROID_TRUE"; then :
+ default_profile=monodroid
+fi
+if test -z "$INSTALL_MONOTOUCH_TRUE"; then :
+ default_profile=monotouch
+fi
+if test -z "$INSTALL_XAMMAC_TRUE"; then :
+ default_profile=xammac
+fi
+if test -z "$INSTALL_4_x_TRUE"; then :
+ default_profile=net_4_x
+fi
+DEFAULT_PROFILE=$default_profile
+AC_SUBST(DEFAULT_PROFILE)
+
AC_CONFIG_FILES([po/mcs/Makefile.in])
AC_CONFIG_FILES([runtime/mono-wrapper],[chmod +x runtime/mono-wrapper])
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/echo "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool; sed -e 's/$ECHO "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
+AC_CONFIG_COMMANDS([nolock-libtool], [sed -e 's/lock_old_archive_extraction=yes/lock_old_archive_extraction=no/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
AC_OUTPUT([
Makefile
-mono-core.spec
mono-uninstalled.pc
scripts/mono-find-provides
scripts/mono-find-requires
mono/arch/arm64/Makefile
mono/arch/ia64/Makefile
mono/arch/mips/Makefile
+mono/sgen/Makefile
mono/tests/Makefile
mono/tests/tests-config
mono/tests/assemblyresolve/Makefile
-mono/tests/cas/Makefile
-mono/tests/cas/assembly/Makefile
-mono/tests/cas/demand/Makefile
-mono/tests/cas/inheritance/Makefile
-mono/tests/cas/linkdemand/Makefile
-mono/tests/cas/threads/Makefile
mono/tests/gc-descriptors/Makefile
mono/unit-tests/Makefile
mono/benchmark/Makefile
-mono/monograph/Makefile
mono/io-layer/Makefile
mono/mini/Makefile
mono/profiler/Makefile
tools/Makefile
tools/locale-builder/Makefile
tools/sgen/Makefile
+tools/monograph/Makefile
runtime/Makefile
msvc/Makefile
po/Makefile
if test x$has_extension_module != xno; then
echo "EXTENSION_MODULE = 1" >> $srcdir/$mcsdir/build/config.make
fi
-
- default_profile=net_2_0
- if test -z "$INSTALL_4_0_TRUE"; then :
- default_profile=net_4_0
- fi
- if test -z "$INSTALL_MONODROID_TRUE"; then :
- default_profile=monodroid
- fi
- if test -z "$INSTALL_MONOTOUCH_TRUE"; then :
- default_profile=monotouch
- fi
- if test -z "$INSTALL_XAMMAC_TRUE"; then :
- default_profile=xammac
- fi
- if test -z "$INSTALL_4_5_TRUE"; then :
- default_profile=net_4_5
- fi
echo "DEFAULT_PROFILE = $default_profile" >> $srcdir/$mcsdir/build/config.make
fi
- # if we have an olive folder, override the default settings
- if test -d $olivedir; then
-
- if test x$cross_compiling = xno && test x$enable_olive_build != xno; then
-
- test -w $srcdir/$olivedir/build || chmod +w $srcdir/$olivedir/build
-
- echo "prefix=$prefix" > $srcdir/$olivedir/build/config.make
- echo "exec_prefix=$exec_prefix" >> $srcdir/$olivedir/build/config.make
- echo 'mono_libdir=${exec_prefix}/lib' >> $srcdir/$olivedir/build/config.make
- echo 'MCS_FLAGS = $(PLATFORM_DEBUG_FLAGS)' >> $srcdir/$olivedir/build/config.make
- echo "RUNTIME = $mono_build_root/runtime/mono-wrapper" >> $srcdir/$olivedir/build/config.make
- echo "MONO_VERSION = $myver" >> $srcdir/$olivedir/build/config.make
- fi
- fi
-
)
libgdiplus_msg=${libgdiplus_loc:-assumed to be installed}
LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm)
Libraries:
- .NET 4.0: $with_profile4
- .NET 4.5: $with_profile4_5
+ .NET 4.6: $with_profile4_x
MonoDroid: $with_monodroid
MonoTouch: $with_monotouch
Xamarin.Mac: $with_xammac