[monkeydoc] Temp API for adding uncompiled sources, should be done differently
[mono.git] / configure.in
index ead801250979fa462220c3d47b08f64a16f5ea2d..be5cbb2477580bff51b0a829a397c33008c1db12 100644 (file)
@@ -1,7 +1,7 @@
 # Process this file with autoconf to produce a configure script.
 #AC_PREREQ([2.62])
 
-AC_INIT(mono, [3.0.2],
+AC_INIT(mono, [3.0.3],
         [http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
 
 AC_CONFIG_SRCDIR([README])
@@ -160,10 +160,10 @@ case "$host" in
                        libmono_cflags="$PTHREAD_CFLAGS"
                fi
                if test "x$PTHREAD_LIBS" = "x"; then
-                       LDFLAGS="$LDFLAGS -pthread"
+                       LDFLAGS="$LDFLAGS -pthread -L/usr/local/lib"
                        libmono_ldflags="-pthread"
                else
-                       LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
+                       LDFLAGS="$LDFLAGS $PTHREAD_LIBS -L/usr/local/lib"
                        libmono_ldflags="$PTHREAD_LIBS"
                fi
                CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
@@ -296,8 +296,6 @@ case "$host" in
                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"
-               LDFLAGS="$LDFLAGS -pthread"
-               libmono_ldflags="-pthread"
                need_link_unlink=yes
                AC_DEFINE(PTHREAD_POINTER_ID)
                AC_DEFINE(USE_MACH_SEMA, 1, [...])
@@ -326,9 +324,6 @@ case "$host" in
                                ;;
                        arm*-darwin*)
                                has_dtrace=no
-
-                               # Disable the clang check if we're cross compiling
-                               mono_cv_clang=no
                                ;;                      
                esac
                ;;
@@ -497,7 +492,7 @@ AC_CHECK_SIZEOF(void *, 4)
 
 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-enum'
+        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'
                # The runtime code does not respect ANSI C strict aliasing rules
                CFLAGS="$CFLAGS -fno-strict-aliasing"
 
@@ -540,14 +535,12 @@ CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -g"
 
 AC_CACHE_CHECK([for clang],
        mono_cv_clang,[
-       AC_TRY_RUN([
-               int main () {
-                       #ifdef __clang__
-                               return 0;
-                       #else
-                               return 1;
-                       #endif
-               }
+       AC_TRY_COMPILE([], [
+               #ifdef __clang__
+               #else
+               #error "FAILED"
+               #endif
+               return 0;
        ],
        [mono_cv_clang=yes],
        [mono_cv_clang=no],
@@ -910,6 +903,15 @@ fi
 AC_ARG_ENABLE(executables, [  --disable-executables disable the build of the runtime executables], enable_executables=$enableval, enable_executables=yes)
 AM_CONDITIONAL(DISABLE_EXECUTABLES, test x$enable_executables = xno)
 
+AC_ARG_ENABLE(extension-module, [  --enable-extension-module enables usage of the extension module], has_extension_module=$enableval, has_extension_module=no)
+AM_CONDITIONAL([HAS_EXTENSION_MODULE], [test x$has_extension_module != xno])
+
+if test x$has_extension_module != xno ; then
+       AC_DEFINE([ENABLE_EXTENSION_MODULE], 1, [Extension module enabled])
+       AC_MSG_NOTICE([Enabling mono extension module.])
+fi
+
+
 AC_MSG_CHECKING(for visibility __attribute__)
 AC_COMPILE_IFELSE([
        AC_LANG_SOURCE([[
@@ -1206,6 +1208,14 @@ if test x$target_win32 = xno; then
        dnl *****************************
        AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
 
+       case "$host" in
+               *-*-*freebsd*)
+                       dnl *****************************
+                       dnl *** Checks for libinotify ***
+                       dnl *****************************
+                       AC_CHECK_LIB(inotify, inotify_init, LIBS="$LIBS -linotify")
+       esac
+
        dnl *******************************
        dnl *** Checks for MSG_NOSIGNAL ***
        dnl *******************************
@@ -2805,6 +2815,11 @@ if test "x$icall_tables" = "xno"; then
    AC_DEFINE(DISABLE_ICALL_TABLES, 1, [Icall tables disabled])
 fi
 
+if test "x$mono_cv_clang" = "xyes"; then
+   # FIXME: This causes many compilation errors
+   with_tls=pthread
+fi
+
 if test "x$with_tls" = "x__thread"; then
        AC_DEFINE(HAVE_KW_THREAD, 1, [Have __thread keyword])
        # Pass the information to libgc
@@ -2970,7 +2985,7 @@ fi
 
 # When --disable-shared is used, libtool transforms libmono-2.0.la into libmono-2.0.so
 # instead of libmono-static.a
-if test "x$enable_shared" = "xno"; then
+if test "x$enable_shared" = "xno" -a "x$enable_executables" = "xyes"; then
    LIBMONO_LA=libmini-static.la
 else
    LIBMONO_LA=libmono-$API_VER.la
@@ -3278,6 +3293,7 @@ data/system.web.mvc.pc
 data/system.web.mvc2.pc
 data/system.web.mvc3.pc
 data/aspnetwebstack.pc
+data/reactive.pc
 samples/Makefile
 support/Makefile
 data/config
@@ -3370,6 +3386,10 @@ fi
       echo "MOONLIGHT = 1" >> $srcdir/$mcsdir/build/config.make
     fi
 
+    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