Switch to compiler-tester
[mono.git] / configure.in
index cfbdc133f070b1ec3fae8c0a668a52a00d96346b..9c71c2a20ff4746f6b78622cc87cb9c6beb039d9 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.1.6.5)
+AM_INIT_AUTOMAKE(mono,1.1.8)
 AM_MAINTAINER_MODE
 
 AC_PROG_LN_S
@@ -223,6 +223,7 @@ AC_CHECK_TOOL(CC, gcc, gcc)
 AC_PROG_CC
 AM_PROG_CC_STDC
 AC_PROG_INSTALL
+AC_PROG_AWK
 dnl We should use AM_PROG_AS, but it's not available on automake/aclocal 1.4
 : ${CCAS='$(CC)'}
 # Set ASFLAGS if not already set.
@@ -252,6 +253,7 @@ AC_SUBST(BUILD_EXEEXT)
 # Set STDC_HEADERS
 AC_HEADER_STDC
 AC_LIBTOOL_WIN32_DLL
+AC_DISABLE_FAST_INSTALL
 AM_PROG_LIBTOOL
 
 # Test whenever ld supports -version-script
@@ -602,7 +604,7 @@ if test x$platform_win32 = xno; then
        # potential compiler bugs.  Defines LARGE_FILE_SUPPORT, adds $1 to
        # CPPFLAGS and sets $large_offt to yes if the test succeeds
        large_offt=no
-       AC_DEFUN(LARGE_FILES, [
+       AC_DEFUN([LARGE_FILES], [
                large_CPPFLAGS=$CPPFLAGS
                CPPFLAGS="$CPPFLAGS $1"
                AC_TRY_RUN([
@@ -1125,6 +1127,28 @@ if test x$platform_win32 = xno; then
                AC_DEFINE(HAVE_EPOLL, 1, [epoll supported])
        fi
 
+       dnl ******************************
+       dnl *** Checks for SIOCGIFCONF ***
+       dnl ******************************
+       AC_CHECK_HEADERS(sys/ioctl.h)
+       AC_CHECK_HEADERS(net/if.h)
+       AC_MSG_CHECKING(for ifreq)
+       AC_TRY_COMPILE([
+               #include <sys/ioctl.h>
+               #include <net/if.h>
+               ], [
+               struct ifconf ifc;
+               struct ifreq *ifr;
+               void *x;
+               ifc.ifc_len = 0;
+               ifc.ifc_buf = NULL;
+               x = (void *) &ifr->ifr_addr;
+               ],[
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_SIOCGIFCONF, 1, [Can get interface list])
+               ], [
+                       AC_MSG_RESULT(no)
+               ])
        dnl **********************************
        dnl *** Checks for MonoPosixHelper ***
        dnl **********************************
@@ -1140,6 +1164,8 @@ if test x$platform_win32 = xno; then
        AC_CHECK_FUNCS(fgetpwent)
        AC_CHECK_FUNCS(fgetpwent)
        AC_CHECK_FUNCS(getfsstat)
+       AC_CHECK_FUNCS(mremap)
+       AC_CHECK_FUNCS(remap_file_pages)
        AC_CHECK_FUNCS(posix_fadvise)
        AC_CHECK_FUNCS(posix_fallocate)
        AC_CHECK_FUNCS(posix_madvise)
@@ -1330,6 +1356,9 @@ JIT_SUPPORTED=no
 INTERP_SUPPORTED=no
 LIBC="libc.so.6"
 INTL="libc.so.6"
+SQLITE="libsqlite.so.0"
+SQLITE3="libsqlite3.so.0"
+X11="libX11.so"
 
 jit_wanted=false
 interp_wanted=false
@@ -1359,8 +1388,12 @@ case "$host" in
                arch_target=sparc;
                JIT_SUPPORTED=yes
                ACCESS_UNALIGNED="no"
-               LIBC="libc.so"
-               INTL="libintl.so"
+               case $host_os in
+                 linux*) ;;
+                 *)
+                       LIBC="libc.so"
+                       INTL="libintl.so"
+               esac
                jit_wanted=true
                if test x"$GCC" = xyes; then
                        CFLAGS="$CFLAGS -Wno-cast-align"
@@ -1373,6 +1406,11 @@ case "$host" in
                INTERP_SUPPORTED=yes
                interp_wanted=true
                arch_target=alpha;
+               case $host_os in
+                 linux*)
+                       LIBC="libc.so.6.1"
+                       INTL="libc.so.6.1"
+               esac
               ;;
        *-*-mingw*|*-*-cygwin*)
                INTL="intl"
@@ -1481,6 +1519,9 @@ case "$host" in
        libsuffix=".dylib"
        LIBC="libc.dylib"
        INTL="libintl.dylib"
+       SQLITE="libsqlite.0.dylib"
+       SQLITE3="libsqlite3.0.dylib"
+       X11="libX11.dylib"
        ;;
      *-*-*netbsd*)
        LIBC="libc.so.12"
@@ -1495,6 +1536,24 @@ case "$host" in
        INTL="libintl.so"
        ;;
 esac
+
+if test "x$X11" = "xlibX11.so"; then
+       AC_PATH_X
+       AC_PATH_PROG(OBJDUMP, objdump, no)
+       if test "x$no_x" != "xyes"; then
+               if test "x$OBJDUMP" != xno; then
+                       AC_MSG_CHECKING(for the soname of libX11.so)
+                       X11=$($OBJDUMP -p  $x_libraries/libX11.so | $AWK '/SONAME/ {print $2}')
+                       AC_MSG_RESULT($X11)
+               else
+                       AC_MSG_WARN([Could not find objdump. WinForms will not work if you install this mono on a box without the X -devel package.]);
+               fi
+       
+       else
+               AC_MSG_WARN([Could not find X development libs. Do you have the -devel package installed? WinForms may not work...]);
+       fi
+fi
+
 AC_SUBST(libsuffix)
 
 if test "x$TARGET" != "xAMD64"; then
@@ -1594,6 +1653,9 @@ AM_CONDITIONAL(INCLUDED_LIBGC, test x$gc = xincluded)
 
 AC_SUBST(LIBC)
 AC_SUBST(INTL)
+AC_SUBST(SQLITE)
+AC_SUBST(SQLITE3)
+AC_SUBST(X11)
 
 AC_SUBST(arch_target)
 AC_SUBST(CFLAGS)
@@ -1654,6 +1716,8 @@ Makefile
 mint.pc
 mono.pc
 scripts/mono-nunit.pc
+scripts/mono-find-provides
+scripts/mono-find-requires
 mono/Makefile
 mono/utils/Makefile
 mono/metadata/Makefile
@@ -1672,6 +1736,7 @@ mono/arch/s390/Makefile
 mono/arch/s390x/Makefile
 mono/arch/arm/Makefile
 mono/arch/alpha/Makefile
+mono/arch/ia64/Makefile
 mono/interpreter/Makefile
 mono/tests/Makefile
 mono/tests/tests-config
@@ -1693,7 +1758,6 @@ data/net_2_0/Makefile
 samples/Makefile
 support/Makefile
 data/config
-mono.spec
 tools/Makefile
 tools/locale-builder/Makefile
 runtime/Makefile