In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
[mono.git] / configure.in
index b3eb4ce2dc898fdbd726f376b9a4792982d2111a..1de3538ada7e41a3606d46dbc406fa6379c70a74 100644 (file)
@@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM
 m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
 
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(mono,2.5)
+AM_INIT_AUTOMAKE(mono,2.7)
 AM_MAINTAINER_MODE
 
 API_VER=1.0
@@ -65,10 +65,19 @@ AC_MSG_CHECKING([host platform characteristics])
 libgc_threads=no
 has_dtrace=no
 parallel_mark=yes
+
+case "$host" in
+       powerpc*-*-linux*)
+               # https://bugzilla.novell.com/show_bug.cgi?id=504411
+               disable_munmap=yes
+       ;;
+esac
+
 case "$host" in
        *-*-mingw*|*-*-cygwin*)
                platform_win32=yes
-               AC_DEFINE(PLATFORM_WIN32,1,[Platform is Win32])
+               AC_DEFINE(PLATFORM_WIN32,1,[Host Platform is Win32])
+               AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32])
                AC_DEFINE(DISABLE_PORTABILITY,1,[Disable the io-portability layer])
                AC_DEFINE(PLATFORM_NO_SYMLINKS,1,[This platform does not support symlinks])
                if test "x$cross_compiling" = "xno"; then
@@ -145,7 +154,10 @@ case "$host" in
                ;;
        *-*-linux*)
                platform_win32=no
-               CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP"
+               CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
+               if test "x$disable_munmap" != "xyes"; then
+                       CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
+               fi
                libmono_cflags="-D_REENTRANT"
                libmono_ldflags="-lpthread"
                libdl="-ldl"
@@ -282,7 +294,7 @@ fi
 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)
-AC_CHECK_HEADERS(sys/user.h sys/socket.h sys/ipc.h sys/sem.h sys/utsname.h alloca.h ucontext.h pwd.h)
+AC_CHECK_HEADERS(sys/user.h sys/socket.h sys/ipc.h sys/sem.h sys/utsname.h alloca.h ucontext.h pwd.h sys/select.h)
 
 
 AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
@@ -590,8 +602,8 @@ AC_ARG_ENABLE(minimal, [  --enable-minimal=LIST      drop support for LIST subsy
 AC_DEFINE_UNQUOTED(DISABLED_FEATURES, "$DISABLED_FEATURES", [String of disabled features])
 
 if test "x$mono_feature_disable_aot" = "xyes"; then
-       AC_DEFINE(DISABLE_AOT, 1, [Disable AOT support])
-       AC_MSG_NOTICE([Disabled support for AOT])
+       AC_DEFINE(DISABLE_AOT_COMPILER, 1, [Disable AOT Compiler])
+       AC_MSG_NOTICE([Disabled AOT compiler])
 fi
 
 if test "x$mono_feature_disable_profiler" = "xyes"; then
@@ -1184,7 +1196,7 @@ if test x$platform_win32 = xno; then
                AC_DEFINE(USE_MONO_MUTEX, 1, [Use mono_mutex_t])
        ])
        AC_CHECK_FUNCS(pthread_attr_setstacksize)
-       AC_CHECK_FUNCS(pthread_attr_getstack)
+       AC_CHECK_FUNCS(pthread_attr_getstack pthread_attr_getstacksize)
        AC_CHECK_FUNCS(pthread_get_stacksize_np pthread_get_stackaddr_np)
 
        dnl ***********************************
@@ -1776,6 +1788,9 @@ if test "x$enable_dtrace" = "xyes"; then
    if test "x$DTRACE" = "xno"; then
          AC_MSG_RESULT([dtrace utility not found, dtrace support disabled.])
          enable_dtrace=no
+   elif ! $DTRACE -h $srcdir/data/mono.d > /dev/null 2>&1; then
+         AC_MSG_RESULT([dtrace doesn't support -h option, dtrace support disabled.])
+         enable_dtrace=no
    fi
 fi
 
@@ -1833,11 +1848,12 @@ if test "x$enable_llvm" = "xyes"; then
 
    LLVM_CXXFLAGS=`$LLVM_CONFIG --cflags`
    LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
-   LLVM_LIBS=`$LLVM_CONFIG --libs core engine`
+   LLVM_LIBS=`$LLVM_CONFIG --libs core bitwriter jit x86codegen`
    LLVM_LIBS="$LLVM_LDFLAGS $LLVM_LIBS -lstdc++"
 
    AC_SUBST(LLVM_CXXFLAGS)
    AC_SUBST(LLVM_LIBS)
+   AC_SUBST(LLVM_LDFLAGS)
    AC_DEFINE(ENABLE_LLVM, 1, [Enable the LLVM back end])
 fi
 
@@ -2066,6 +2082,14 @@ else
    AC_DEFINE(SIZEOF_REGISTER,SIZEOF_VOID_P,[size of machine integer registers])
 fi
 
+if test "x$target_byte_order" = "xG_BIG_ENDIAN"; then
+   AC_DEFINE(TARGET_BYTE_ORDER,G_BIG_ENDIAN,[byte order of target])
+elif test "x$target_byte_order" = "xG_LITTLE_ENDIAN"; then
+   AC_DEFINE(TARGET_BYTE_ORDER,G_LITTLE_ENDIAN,[byte order of target])
+else
+   AC_DEFINE(TARGET_BYTE_ORDER,G_BYTE_ORDER,[byte order of target])
+fi
+
 if test "x$have_visibility_hidden" = "xyes"; then
    AC_DEFINE(HAVE_VISIBILITY_HIDDEN, 1, [Support for the visibility ("hidden") attribute])
 fi
@@ -2180,6 +2204,9 @@ if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86" -o "x$TARGET" = "xALPHA"; t
                *-*-*linux*)
                        mono_debugger_supported=yes
                        ;;
+               *86-apple-darwin*)
+                       mono_debugger_supported=yes
+                       ;;              
                esac
        fi
 fi
@@ -2247,19 +2274,10 @@ case "x$gc" in
                ;;
 esac
 
-PROFILE2=yes
-AC_ARG_WITH(profile2,  [  --with-profile2=yes,no          If you want to install the 2.0 FX (defaults to yes)],[
-       if test x$with_profile2 = xno; then
-             PROFILE2=no
-       fi
-])
-
-MOONLIGHT=yes
-AC_ARG_WITH(moonlight,[  --with-moonlight=yes,no        If you want to build the Moonlight 2.1 assemblies (defaults to yes)],[
-       if test x$with_moonlight = xno; then
-             MOONLIGHT=no
-       fi
-])
+#AC_ARG_WITH(profile2,  [  --with-profile2=yes,no          If you want to install the 2.0 FX (defaults to yes)],                 [], [with_profile2=yes])
+AC_ARG_WITH(profile4,  [  --with-profile4=yes,no          If you want to install the 4.0 FX (defaults to no)],                  [], [with_profile4=no])
+AC_ARG_WITH(moonlight, [  --with-moonlight=yes,no         If you want to build the Moonlight 2.1 assemblies (defaults to yes)], [], [with_moonlight=yes])
+AC_ARG_WITH(monotouch, [  --with-monotouch=yes,no         If you want to build the raw MonoTouch 2.1 assemblies (defaults to no)], [], [with_monotouch=no])
 
 OPROFILE=no
 AC_ARG_WITH(oprofile,[  --with-oprofile=no,<oprofile install dir>   Enable oprofile support (defaults to no)],[
@@ -2291,14 +2309,26 @@ AC_ARG_WITH(mcs_docs,[  --with-mcs-docs=yes,no         If you want to build the
        fi
 ])
 
+dnl
+dnl Consistency settings
+dnl
+if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
+   DISABLE_MCS_DOCS=yes
+   docs_dir=""
+else
+   docs_dir=docs
+fi
+AC_SUBST(docs_dir)
+
 AM_CONDITIONAL(HAVE_OPROFILE, test x$OPROFILE = xyes)
 AC_SUBST(OPROFILE_CFLAGS)
 AC_SUBST(OPROFILE_LIBS)
 
 libmono_ldflags="$libmono_ldflags $LIBS"
 
-AM_CONDITIONAL(INSTALL_2_0, test x$PROFILE2 = xyes)
-AM_CONDITIONAL(INSTALL_2_1, test x$MOONLIGHT = xyes)
+AM_CONDITIONAL(INSTALL_2_1, [test "x$with_moonlight" = xyes])
+AM_CONDITIONAL(INSTALL_4_0, [test "x$with_profile4" = xyes])
+AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" = xyes])
 
 AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
 AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
@@ -2429,6 +2459,34 @@ AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/Browsers/Compat.browser],
     cd $depth
 ],[LN_S='$LN_S'])
 
+AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/machine.config],
+[   depth=../../../..
+    case $srcdir in
+    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
+    .) reldir=$depth ;;
+    *) reldir=$depth/$srcdir ;;
+    esac
+    $ac_aux_dir/install-sh -d runtime/etc/mono/4.0
+    cd runtime/etc/mono/4.0
+    rm -f machine.config
+    $LN_S $reldir/data/net_4_0/machine.config machine.config
+    cd $depth
+],[LN_S='$LN_S'])
+
+AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/web.config],
+[   depth=../../../..
+    case $srcdir in
+    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
+    .) reldir=$depth ;;
+    *) reldir=$depth/$srcdir ;;
+    esac
+    $ac_aux_dir/install-sh -d runtime/etc/mono/4.0
+    cd runtime/etc/mono/4.0
+    rm -f web.config
+    $LN_S $reldir/data/net_4_0/web.config web.config
+    cd $depth
+],[LN_S='$LN_S'])
+
 if test x$enable_quiet_build = xyes; then
    AC_CONFIG_COMMANDS([quiet], [for i in `find mono libgc support -name Makefile.in | sed -e 's/Makefile.in/Makefile/g'`; do if test -f $i; then $srcdir/scripts/patch-quiet.sh $i; fi; done], [shell=$SHELL])
    AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/$echo "copying selected/$show "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])
@@ -2436,6 +2494,7 @@ fi
 
 AC_OUTPUT([
 Makefile
+mono-core.spec
 mono-uninstalled.pc
 scripts/mono-find-provides
 scripts/mono-find-requires
@@ -2477,8 +2536,8 @@ man/Makefile
 web/Makefile
 docs/Makefile
 data/Makefile
-data/net_1_1/Makefile
 data/net_2_0/Makefile
+data/net_4_0/Makefile
 data/net_2_0/Browsers/Makefile
 data/mint.pc
 data/mono.pc
@@ -2514,13 +2573,6 @@ if test x$platform_win32 = xyes; then
    sed -e "s,-mno-cygwin,,g" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool
 fi
 
-dnl
-dnl Consistency settings
-dnl
-if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
-   DISABLE_MCS_DOCS=yes
-fi
-
 (
   case $prefix in
   NONE) prefix=$ac_default_prefix ;;
@@ -2584,7 +2636,7 @@ fi
       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
-         if test x$with_moonlight = xyes; then
+      if test x$with_moonlight = xyes; then
         echo "WITH_MOONLIGHT = yes" >> $srcdir/$olivedir/build/config.make
       fi
     fi
@@ -2602,11 +2654,13 @@ echo "
         olive source:  $olive_topdir
 
        GC:            $gc
+       GLIB:          $with_glib
        TLS:           $with_tls
        SIGALTSTACK:   $with_sigaltstack
        Engine:        $jit_status
-       2.0 Profile:   $PROFILE2
-       2.1 Alpha:     $MOONLIGHT
+       Moon Profile:  $with_moonlight
+       4.0 Alpha:     $with_profile4
+       MonoTouch:     $with_monotouch
        JNI support:   $jdk_headers_found
        libgdiplus:    $libgdiplus_msg
        zlib:          $zlib_msg