2005-04-09 Joerg Rosenkranz <joergr@voelcker.com>
[mono.git] / configure.in
index e7675d47482290128a8f8305ffdb68524132cd3f..7290f65899872afabb88e700da098af9b4cc02f6 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.5)
+AM_INIT_AUTOMAKE(mono,1.1.7)
 AM_MAINTAINER_MODE
 
 AC_PROG_LN_S
@@ -60,7 +60,7 @@ case "$host" in
                export CC
 # latest libgc already defines GC_WIN32_THREADS
 #              CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS -DWIN32_THREADS"
-               CPPFLAGS="$CPPFLAGS -DWIN32_THREADS"
+               CPPFLAGS="$CPPFLAGS -DWIN32_THREADS -DFD_SETSIZE=1024"
                libdl=
                libgc_threads=win32
                gc_default=included
@@ -249,11 +249,18 @@ AM_CONDITIONAL(HAVE_ZLIB, test x$have_zlib = xyes)
 # for mono/metadata/debug-symfile.c
 AC_CHECK_HEADERS(elf.h)
 
+# for support
+AC_CHECK_HEADERS(poll.h)
+AC_CHECK_HEADERS(sys/poll.h)
+AC_CHECK_HEADERS(sys/wait.h)
+AC_CHECK_HEADERS(grp.h)
+AC_CHECK_HEADERS(syslog.h)
+
 # for mono/dis
 AC_CHECK_HEADERS(wchar.h)
 AC_CHECK_HEADERS(ieeefp.h)
 AC_MSG_CHECKING(for isinf)
-AC_TRY_COMPILE([#include <math.h>], [
+AC_TRY_LINK([#include <math.h>], [
        int f = isinf (1);
 ], [
        AC_MSG_RESULT(yes)
@@ -309,16 +316,16 @@ AC_SUBST([mcs_topdir])
 AC_SUBST([mcs_topdir_from_srcdir])
 
 AC_ARG_WITH([libgdiplus], 
-       [  --with-libgdiplus=no|sibling|<path>  Override the libgdiplus used for System.Drawing tests (defaults to NO)], 
-       [], [with_libgdiplus=no])
+       [  --with-libgdiplus=installed|sibling|<path>   Override the libgdiplus used for System.Drawing tests (defaults to NO)], 
+       [], [with_libgdiplus=installed])
 
 case $with_libgdiplus in
-no) libgdiplus_topdir= ;;
-yes|sibling) libgdiplus_topdir=`cd ../libgdiplus && pwd` ;;
-/*) libgdiplus_topdir=$with_libgdiplus ;;
-*) libgdiplus_topdir=`cd $with_libgdiplus && pwd` ;;
+no|installed) libgdiplus_loc= ;;
+yes|sibling) libgdiplus_loc=`cd ../libgdiplus && pwd`/src/libgdiplus.la ;;
+/*) libgdiplus_loc=$with_libgdiplus ;;
+*) libgdiplus_loc=`pwd`/$with_libgdiplus ;;
 esac
-AC_SUBST([libgdiplus_topdir])
+AC_SUBST([libgdiplus_loc])
 
 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
 if test "x$PKG_CONFIG" = "xno"; then
@@ -332,15 +339,15 @@ BUILD_GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
 AC_SUBST(BUILD_GLIB_CFLAGS)
 AC_SUBST(BUILD_GLIB_LIBS)
 
-PKG_PATH=
+pkg_config_path=
 AC_ARG_WITH(crosspkgdir, [  --with-crosspkgdir=/path/to/pkg-config/dir],
        if test x$with_crosspkgdir = "x"; then
                if test -s $PKG_CONFIG_PATH; then
-                       PKG_PATH=$PKG_CONFIG_PATH
+                       pkg_config_path=$PKG_CONFIG_PATH
                fi
        else
-               PKG_PATH=$with_crosspkgdir
-               PKG_CONFIG_PATH=$PKG_PATH
+               pkg_config_path=$with_crosspkgdir
+               PKG_CONFIG_PATH=$pkg_config_path
                export PKG_CONFIG_PATH
        fi
 )
@@ -510,6 +517,11 @@ case "x$gc" in
                ;;
 esac
 
+AC_ARG_WITH(large-heap, [  --with-large-heap=yes,no    Enable support for GC heaps larger than 3GB], [large_heap=$withval], [large_heap=no])
+if test "x$large_heap" = "xyes"; then
+   echo "FOO"
+   CPPFLAGS="$CPPFLAGS -DLARGE_CONFIG"
+fi
 
 # tell libgc/configure about what we want
 ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads"
@@ -900,23 +912,23 @@ if test x$platform_win32 = xno; then
 
                                sa.sa_sigaction = sigsegv_signal_handler;
                                sigemptyset (&sa.sa_mask);
-                               sa.sa_flags = SA_SIGINFO | SA_STACK;
+                               sa.sa_flags = SA_SIGINFO | SA_ONSTACK;
                                if (sigaction (SIGSEGV, &sa, NULL) == -1) {
-                                       perror ("lala");
+                                       perror ("sigaction");
                                        return;
                                }
 
                                sas.ss_sp = malloc (SIGSTKSZ);
                                sas.ss_size = SIGSTKSZ;
-                               sas.ss_flags = SS_ONSTACK;
+                               sas.ss_flags = 0;
                                if (sigaltstack (&sas, NULL) == -1) {
-                                       perror ("lala");
+                                       perror ("sigaltstack");
                                        return;
                                }
 
                                pthread_attr_init (&attr);
                                if (pthread_create(&id, &attr, loop, &attr) != 0) {
-                                       printf ("failed\n");
+                                       printf ("pthread_create\n");
                                        return;
                                }
 
@@ -1533,7 +1545,7 @@ if test ${ACCESS_UNALIGNED} = no; then
        CPPFLAGS="$CPPFLAGS -DNO_UNALIGNED_ACCESS"
 fi
 
-PREVIEW=no
+PREVIEW=yes
 AC_ARG_WITH(preview, [ --with-preview=yes,no     If you want to install the 2.0 FX preview],[
        if test x$with_preview = xyes; then
              PREVIEW=yes
@@ -1677,14 +1689,11 @@ runtime/Makefile
 
   echo "prefix=$prefix" > $srcdir/$mcsdir/build/config.make
   echo "exec_prefix=$exec_prefix" >> $srcdir/$mcsdir/build/config.make
-  echo "libdir=$libdir" >> $srcdir/$mcsdir/build/config.make
+  echo "mono_libdir=$exec_prefix/lib" >> $srcdir/$mcsdir/build/config.make
   echo 'MCS_FLAGS = $(PLATFORM_DEBUG_FLAGS)' >> $srcdir/$mcsdir/build/config.make
 )
 
-case $libgdiplus_topdir in
-'') libgdiplus_loc='installed (assumed to exist, have not checked)' ;;
-*) libgdiplus_loc=$libgdiplus_topdir ;;
-esac
+libgdiplus_msg=${libgdiplus_loc:-assumed to be installed}
 
 echo "
         mcs source:  $mcs_topdir
@@ -1695,7 +1704,7 @@ echo "
        Engine:      $jit_status
        2.0 Alpha:   $PREVIEW
        JNI support: $jdk_headers_found
-       libgdiplus:  $libgdiplus_loc
+       libgdiplus:  $libgdiplus_msg
        $disabled
 
 "