2005-04-08 Alp Toker <alp@atoker.com>
[mono.git] / configure.in
index 0cc2e9e26c9ccf3362e3e2b7fe586429eaa44dd0..70e9e0f6f51b1fa99857c91078dfe5d27bf3e042 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
@@ -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
 )
@@ -900,23 +907,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;
                                }
 
@@ -1028,41 +1035,6 @@ if test x$platform_win32 = xno; then
                AC_MSG_RESULT(no)
        ]) 
 
-       dnl *********************
-       dnl *** Check for AIO ***
-       dnl *********************
-       AC_MSG_CHECKING([for SIGEV_THREAD definition])
-       dnl Some systems (FreeBSD at least) may have aio_read
-       dnl but don't support/define SIGEV_THREAD.
-       AC_TRY_COMPILE([
-       #include <sys/signal.h>
-       ],[
-       int x = SIGEV_THREAD;
-       ],[
-               ac_cv_c_sigev_thread=yes
-               AC_MSG_RESULT(yes)
-       ],[
-               AC_MSG_RESULT(no)
-       ])
-
-       if test "$ac_cv_c_sigev_thread" = "yes" ; then
-               AC_CHECK_HEADERS(aio.h sys/aio.h)
-               AC_CHECK_LIB(rt, aio_read, [ LIBS="$LIBS -lrt" ],)
-               SIGVAL_PTR="undefined"
-               if test "$ac_cv_header_aio_h" = "yes" -o "$ac_cv_header_sys_aio_h" = "yes" ; then
-                       AC_CHECK_MEMBER(union sigval.sigval_ptr,SIGVAL_PTR="sigval_ptr",, [
-                                       #include <sys/signal.h>
-                                       ])
-                       AC_CHECK_MEMBER(union sigval.sival_ptr,SIGVAL_PTR="sival_ptr",, [
-                                       #include <sys/signal.h>
-                                       ])
-                       if test "$SIGVAL_PTR" = "undefined" ; then
-                               AC_MSG_ERROR([Unable to detect field name in 'union sigval'])
-                       fi
-               fi
-               AC_DEFINE_UNQUOTED(SIGVAL_PTR,$SIGVAL_PTR,[Pointer field name in 'union sigval'])
-       fi
-
        dnl **********************************
        dnl *** Checks for MonoPosixHelper ***
        dnl **********************************
@@ -1677,14 +1649,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 +1664,7 @@ echo "
        Engine:      $jit_status
        2.0 Alpha:   $PREVIEW
        JNI support: $jdk_headers_found
-       libgdiplus:  $libgdiplus_loc
+       libgdiplus:  $libgdiplus_msg
        $disabled
 
 "