X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=configure.ac;h=7b9f3fabe10508c3e852ce213b10ab8c826d64d3;hb=585c1278cbacd6dbde106f96a98711471a5b70b6;hp=979f4a18db6d63bd37c4ecd48fc46f6f00f55152;hpb=e666a5ee28575d714d29ec8f9fb009e383f73acf;p=mono.git diff --git a/configure.ac b/configure.ac index 979f4a18db6..7b9f3fabe10 100644 --- a/configure.ac +++ b/configure.ac @@ -306,7 +306,6 @@ case "$host" in 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" libmono_cflags="-D_THREAD_SAFE" need_link_unlink=yes AC_DEFINE(PTHREAD_POINTER_ID) @@ -441,8 +440,8 @@ 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) +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) AC_CHECK_HEADERS([linux/netlink.h linux/rtnetlink.h], [], [], [#include #include @@ -1519,11 +1518,32 @@ if test x$target_win32 = xno; then ]) ]) + dnl ********************************** + dnl *** Check for getaddrinfo *** + dnl ********************************** + AC_MSG_CHECKING(for getaddrinfo) + AC_TRY_LINK([ + #include + #include + ], [ + 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 ], [ + AC_TRY_LINK([ + #include + #include + ], [ + gethostbyname2_r(NULL,0,NULL,NULL,0,NULL,NULL); ], [ # Yes, we have it... @@ -1533,6 +1553,92 @@ if test x$target_win32 = xno; then AC_MSG_RESULT(no) ]) + dnl ********************************** + dnl *** Check for gethostbyname2 *** + dnl ********************************** + AC_MSG_CHECKING(for gethostbyname2) + AC_TRY_LINK([ + #include + #include + ], [ + 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 + #include + ], [ + 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 + #include + ], [ + 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 + #include + ], [ + 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 + #include + ], [ + 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 ***************************** @@ -2156,6 +2262,97 @@ else AC_MSG_RESULT(no) ]) ]) + + dnl ********************************** + dnl *** Check for getaddrinfo *** + dnl ********************************** + AC_MSG_CHECKING(for getaddrinfo) + AC_TRY_LINK([ + #include + #include + #include + ], [ + 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 + #include + #include + ], [ + 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 + #include + #include + ], [ + 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 + #include + #include + ], [ + 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 + #include + #include + ], [ + 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) + ]) + AC_CHECK_DECLS(InterlockedExchange64, [], [], [[#include ]]) AC_CHECK_DECLS(InterlockedCompareExchange64, [], [], [[#include ]]) AC_CHECK_DECLS(InterlockedDecrement64, [], [], [[#include ]]) @@ -2420,6 +2617,9 @@ AC_ARG_WITH(llvm, [ --with-llvm= Enable the LLVM back-end], ena if test "x$enable_llvm" = "xyes"; then if test "x$with_llvm" != "x"; then LLVM_CONFIG=$with_llvm/bin/llvm-config + if test x$target_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 @@ -2437,6 +2637,8 @@ if test "x$enable_llvm" = "xyes"; then ;; esac + if test "x$target_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 @@ -2466,17 +2668,37 @@ if test "x$enable_llvm" = "xyes"; then 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_api_version=1 + 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) @@ -2796,7 +3018,18 @@ if test "x$host" != "x$target"; then # in mono-compiler.h with_tls=pthread target_mach=no - ;; + ;; + aarch64*-linux-*) + TARGET=ARM64; + arch_target=arm64; + AC_DEFINE(TARGET_ARM64, 1, [...]) + AC_DEFINE(TARGET_ANDROID, 1, [...]) + CPPFLAGS="$CPPFLAGS" + # Can't use tls, since it depends on the runtime detection of tls offsets + # in mono-compiler.h + with_tls=pthread + target_mach=no + ;; aarch64-*) TARGET=ARM64 ;; @@ -2842,6 +3075,46 @@ SPARC64) ;; 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= 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 @@ -3196,8 +3469,6 @@ case "x$libgc" in ;; 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(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]) @@ -3232,7 +3503,7 @@ AC_ARG_WITH(mcs_docs,[ --with-mcs-docs=yes,no If you want to build the DISABLE_MCS_DOCS=yes fi ]) -if test x$with_profile4 != xyes; then +if test x$with_profile4_5 != xyes; then DISABLE_MCS_DOCS=yes fi @@ -3272,7 +3543,6 @@ dnl Consistency settings 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_monodroid=no with_monotouch=no @@ -3295,7 +3565,6 @@ AC_SUBST(OPROFILE_LIBS) 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_MONODROID, [test "x$with_monodroid" != "xno"]) AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" != "xno"]) @@ -3550,7 +3819,6 @@ 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 @@ -3592,6 +3860,7 @@ data/config tools/Makefile tools/locale-builder/Makefile tools/sgen/Makefile +tools/monograph/Makefile runtime/Makefile msvc/Makefile po/Makefile @@ -3678,10 +3947,7 @@ fi 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 + default_profile=net_4_5 if test -z "$INSTALL_MONODROID_TRUE"; then : default_profile=monodroid fi @@ -3739,7 +4005,6 @@ echo " LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm) Libraries: - .NET 4.0: $with_profile4 .NET 4.5: $with_profile4_5 MonoDroid: $with_monodroid MonoTouch: $with_monotouch