AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(mono,0.24)
+AM_INIT_AUTOMAKE(mono,0.25.99.2)
AM_MAINTAINER_MODE
+dnl
+dnl libgc checks
+dnl
+
+gc_headers=no
+gc=included
+use_included_gc=no
+
+if test -d $srcdir/libgc ; then
+ gc_default=included
+else
+ gc_default=boehm
+fi
+
#
# These are the flags that need to be stored in the mono.pc file for
# compiling code that will embed Mono
AC_DEFINE(PLATFORM_WIN32)
CC="gcc -mno-cygwin"
HOST_CC="gcc"
- CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS -DWIN32_THREADS"
+# latest libgc already defines GC_WIN32_THREADS
+# CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS -DWIN32_THREADS"
+ CPPFLAGS="$CPPFLAGS -DWIN32_THREADS"
libdl=
libgc_threads=win32
+ gc_default=boehm
;;
*-*-*netbsd*)
platform_win32=no
AC_DEFINE(PTHREAD_POINTER_ID)
libdl=
libgc_threads=no
+ gc_default=none
;;
*)
AC_MSG_WARN([*** Please add $host to configure.in checks!])
AC_PROG_CC
AM_PROG_CC_STDC
AC_PROG_INSTALL
+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.
+: ${CCASFLAGS='$(CFLAGS)'}
+AC_SUBST(CCAS)
+AC_SUBST(CCASFLAGS)
AC_CHECK_PROG(BISON, bison,yes,no)
if test "x$BISON" = "xno";
AC_SUBST(GMODULE_CFLAGS)
AC_SUBST(GMODULE_LIBS)
-dnl
-dnl libgc checks
-dnl
+AC_ARG_WITH(gc, [ --with-gc=boehm,included,none],[gc=$with_gc],[gc=$gc_default])
-dnl 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])
+# assembly bundle support, see metadata/make-bundle.pl for more info
+AC_ARG_WITH(bundle, [ --with-bundle=bundle_template],[
+ BUNDLE_FILE=$with_bundle
+ AC_SUBST(BUNDLE_FILE)
+ AC_DEFINE(WITH_BUNDLE)
+],[with_bundle=no])
+AM_CONDITIONAL(WITH_BUNDLE, test x$with_bundle != xno)
LIBGC_CFLAGS=
LIBGC_LIBS=
+libgc_dir=
case "x$gc" in
xboehm|xbohem|xyes)
AC_CHECK_HEADERS(gc.h gc/gc.h, gc_headers=yes)
AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes",,$libdl)
if test "x$found_boehm" != "xyes"; then
- AC_MSG_ERROR("GC requested but libgc not found!")
+ AC_MSG_ERROR("GC requested but libgc not found! Install libgc or run configure with --with-gc=none.")
fi
if test "x$gc_headers" != "xyes"; then
AC_MSG_ERROR("GC requested but header files not found! You may need to install them by hand.")
AC_SUBST(HAVE_BOEHM_GC)
LIBGC_LIBS="-lgc $libdl"
- AC_CHECK_FUNCS(GC_gcj_malloc)
+ # AC_CHECK_FUNCS does not work for some reason...
+ AC_CHECK_LIB(gc, GC_gcj_malloc, found_gcj_malloc="yes",,$libdl)
+ if test "x$found_gcj_malloc" = "xyes"; then
+ AC_DEFINE(HAVE_GC_GCJ_MALLOC)
+ fi
;;
xincluded)
+ AC_CONFIG_SUBDIRS(libgc)
+
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'
AC_DEFINE(HAVE_GC_H)
AC_DEFINE(USE_INCLUDED_LIBGC)
+
+ # The included libgc contains GCJ support
+ AC_DEFINE(HAVE_GC_GCJ_MALLOC)
;;
xnone)
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
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 **********************************
+ dnl *** Check for gethostbyname2_r ***
+ dnl **********************************
+ AC_MSG_CHECKING(for gethostbyname2_r)
+ AC_TRY_COMPILE([#include <netdb.h>], [
+ gethostbyname2_r(NULL,0,NULL,NULL,0,NULL,NULL);
+ ], [
+ # Yes, we have it...
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GETHOSTBYNAME2_R)
])
dnl *****************************
mono/io-layer/Makefile
mono/handles/Makefile
mono/mini/Makefile
+mono/profiler/Makefile
runtime/Makefile
scripts/Makefile
man/Makefile