* HttpChannel.cs, HttpClientChannel.cs, HttpHelper.cs, HttpServer.cs,
[mono.git] / configure.in
index 0a9567d0d5336425f4f601f0181f7c3e978dccc7..cfc5a897366f85d2c5ec13981e4305ca34026ec5 100644 (file)
@@ -168,15 +168,23 @@ dnl
 dnl libgc checks
 dnl
 
-dnl AC_CONFIG_SUBDIRS(libgc)
+AC_CONFIG_SUBDIRS(libgc)
 
 gc_headers=no
 gc=included
 use_included_gc=no
-AC_ARG_WITH(gc, [  --with-gc=boehm,included,none],[gc=$with_gc],[gc=included])
+
+if test -d $srcdir/libgc ; then
+  gc_default=included
+else
+  gc_default=boehm
+fi
+
+AC_ARG_WITH(gc, [  --with-gc=boehm,included,none],[gc=$with_gc],[gc=$gc_default])
 
 LIBGC_CFLAGS=
 LIBGC_LIBS=
+libgc_dir=
 case "x$gc" in
        xboehm|xbohem|xyes)
                AC_CHECK_HEADERS(gc.h gc/gc.h, gc_headers=yes)
@@ -200,6 +208,7 @@ case "x$gc" in
                found_boehm=yes
                gc_headers=yes
                use_included_gc=yes
+               libgc_dir=libgc
 
                LIBGC_CFLAGS='-I$(top_srcdir)/libgc/include'
                LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la'
@@ -209,6 +218,9 @@ case "x$gc" in
 
                AC_DEFINE(HAVE_GC_H)
                AC_DEFINE(USE_INCLUDED_LIBGC)
+
+               # The included libgc contains GCJ support
+               AC_DEFINE(HAVE_GC_GCJ_MALLOC)
                ;;
 
        xnone)
@@ -226,6 +238,7 @@ export libgc_threads
 AM_CONDITIONAL(INCLUDED_LIBGC, test x$use_included_gc = xyes)
 AC_SUBST(LIBGC_CFLAGS)
 AC_SUBST(LIBGC_LIBS)
+AC_SUBST(libgc_dir)
 
 dnl
 dnl End of libgc checks
@@ -355,8 +368,20 @@ if test x$platform_win32 = xno; then
                AC_MSG_RESULT(yes)
                AC_DEFINE(HAVE_STRUCT_IP_MREQN)
        ], [
-               # We'll just have to use struct ip_mreq
+               # We'll just have to try and use struct ip_mreq
                AC_MSG_RESULT(no)
+               AC_MSG_CHECKING(for struct ip_mreq)
+               AC_TRY_COMPILE([#include <netinet/in.h>], [
+                       struct ip_mreq mreq;
+                       mreq.imr_interface.s_addr = 0;
+               ], [
+                       # Yes, we have it...
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_STRUCT_IP_MREQ)
+               ], [
+                       # No multicast support
+                       AC_MSG_RESULT(no)
+               ])
        ])
 
        dnl *****************************