2007-05-25 Nidhi Rawal <rawalnidhi_rawal@gmail.com>
[mono.git] / configure.in
index e16f849a946cdf29f1f83b0fee0895092489e2d1..030da56d021ccb86b7a247a692ca4d7c7aba6553 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,1.2)
+AM_INIT_AUTOMAKE(mono,1.2.4)
 AM_MAINTAINER_MODE
 
 API_VER=1.0
@@ -44,12 +44,13 @@ libmono_cflags=""
 libmono_ldflags=""
 AC_SUBST(libmono_cflags)
 AC_SUBST(libmono_ldflags)
+export_ldflags=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+AC_SUBST(export_ldflags)
 
 # Variable to have relocatable .pc files (lib, or lib64)
 reloc_libdir=`basename ${libdir}`
 AC_SUBST(reloc_libdir)
 
-
 dnl if linker handles the version script
 no_version_script=no
 
@@ -69,7 +70,7 @@ case "$host" in
                        export CC
                fi
                HOST_CC="gcc"
-               CPPFLAGS="$CPPFLAGS -DWIN32_THREADS -DFD_SETSIZE=1024"
+               CPPFLAGS="$CPPFLAGS -DWIN32_THREADS -DFD_SETSIZE=1024 -DUNICODE -D_UNICODE"
                libmono_cflags="-mno-cygwin"
                libmono_ldflags="-mno-cygwin"
                libdl=
@@ -82,14 +83,15 @@ case "$host" in
                ;;
        *-*-*netbsd*)
                platform_win32=no
-               CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+               CPPFLAGS="$CPPFLAGS -D_REENTRANT -DGC_NETBSD_THREADS -D_GNU_SOURCE"
                libmono_cflags="-D_REENTRANT"
                LDFLAGS="$LDFLAGS -pthread"
                CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
                libmono_ldflags="-pthread"
                need_link_unlink=yes
-               libdl=
-               libgc_threads=no
+               libdl="-ldl"
+               libgc_threads=pthreads
+               with_sigaltstack=no
                ;;
 # these flags will work for all versions of -STABLE
 #
@@ -898,20 +900,48 @@ if test x$platform_win32 = xno; then
        ])
 
        dnl *****************************
-    dnl *** Checks for IPV6_PKTINFO ***
-    dnl *****************************
-    AC_MSG_CHECKING(for IPV6_PKTINFO)
-    AC_TRY_COMPILE([#include <netdb.h>], [
-        int level = IPV6_PKTINFO;
-    ], [
-        # Yes, we have it...
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_IPV6_PKTINFO)
-    ], [
-        AC_MSG_RESULT(no)
-    ])
-       dnl *********************************
+       dnl *** Checks for IPV6_PKTINFO ***
+       dnl *****************************
+       AC_MSG_CHECKING(for IPV6_PKTINFO)
+       AC_TRY_COMPILE([#include <netdb.h>], [
+               int level = IPV6_PKTINFO;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_IPV6_PKTINFO)
+       ], [
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl **********************************
+       dnl *** Checks for IP_DONTFRAGMENT ***
+       dnl **********************************
+       AC_MSG_CHECKING(for IP_DONTFRAGMENT)
+       AC_TRY_COMPILE([#include <netdb.h>], [
+               int level = IP_DONTFRAGMENT;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_IP_DONTFRAGMENT)
+       ], [
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl **********************************
+       dnl *** Checks for IP_MTU_DISCOVER ***
+       dnl **********************************
+       AC_MSG_CHECKING(for IP_MTU_DISCOVER)
+       AC_TRY_COMPILE([#include <netdb.h>], [
+               int level = IP_MTU_DISCOVER;
+       ], [
+               # Yes, we have it...
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_IP_MTU_DISCOVER)
+       ], [
+               AC_MSG_RESULT(no)
+       ])
+
+       dnl *********************************
        dnl *** Check for struct ip_mreqn ***
        dnl *********************************
        AC_MSG_CHECKING(for struct ip_mreqn)
@@ -1373,6 +1403,12 @@ if test x$platform_win32 = xno; then
                AC_CHECK_LIB(attr, lsetxattr, XATTR_LIB="-lattr",)
        )
        AC_SUBST(XATTR_LIB)
+       
+       dnl *********************************
+       dnl *** Checks for Windows compilation ***
+       dnl *********************************
+       AC_CHECK_HEADERS(sys/time.h)
+       AC_CHECK_HEADERS(sys/param.h)
 
        dnl *********************************
        dnl *** Check for Console 2.0 I/O ***
@@ -1393,6 +1429,7 @@ else
        AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
        AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?))
        AC_CHECK_LIB(ole32, main, LIBS="$LIBS -lole32", AC_ERROR(bad mingw install?))
+       AC_CHECK_LIB(winmm, main, LIBS="$LIBS -lwinmm", AC_ERROR(bad mingw install?))
        AC_CHECK_LIB(oleaut32, main, LIBS="$LIBS -loleaut32", AC_ERROR(bad mingw install?))
 
        dnl *********************************
@@ -1578,6 +1615,10 @@ case "$host" in
                  solaris*)
                        LIBC="libc.so"
                        INTL="libintl.so"
+                       if test "x$ac_cv_sizeof_void_p" = "x8"; then
+                               TARGET=AMD64
+                               arch_target=amd64
+                       fi
 
                        # On solaris 10 x86, gcc prints a warning saying 'visibility attribute not supported on this configuration; ignored', but linking fails. A test case:
                        # int astruct __attribute__ ((visibility ("hidden")));
@@ -1591,7 +1632,6 @@ case "$host" in
                        # ld: fatal: relocation error: R_386_GOTOFF: file /var/tmp//ccxYR96k.o: symbol astruct: relocation must bind locally
                        have_visibility_hidden=no
 
-                       libmono_ldflags="$libmono_ldflags $LIBS"
                esac
                ;;
        x86_64-*-* | amd64-*-*)
@@ -1625,7 +1665,6 @@ case "$host" in
                  *)
                        LIBC="libc.so"
                        INTL="libintl.so"
-                       libmono_ldflags="$libmono_ldflags $LIBS"
                esac
                jit_wanted=true
                if test x"$GCC" = xyes; then
@@ -1882,6 +1921,8 @@ AC_ARG_WITH(preview, [ --with-preview=yes,no     If you want to install the 2.0
        fi
 ])
 
+libmono_ldflags="$libmono_ldflags $LIBS"
+
 AM_CONDITIONAL(INSTALL_2_0, test x$PREVIEW = xyes)
 
 AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
@@ -1979,6 +2020,20 @@ AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/web.config],
     cd $depth
 ],[LN_S='$LN_S'])
 
+AC_CONFIG_COMMANDS([runtime/etc/mono/browscap.ini],
+[   depth=../../..
+    case $srcdir in
+    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
+    .) reldir=$depth ;;
+    *) reldir=$depth/$srcdir ;;
+    esac
+    $ac_aux_dir/install-sh -d runtime/etc/mono/
+    cd runtime/etc/mono/
+    rm -f browscap.ini
+    $LN_S $reldir/data/browscap.ini browscap.ini
+    cd $depth
+],[LN_S='$LN_S'])
+
 AC_OUTPUT([
 Makefile
 mint.pc
@@ -2036,6 +2091,7 @@ data/config
 tools/Makefile
 tools/locale-builder/Makefile
 runtime/Makefile
+msvc/Makefile
 ])
 
 if test x$platform_win32 = xyes; then