2 AM_CONFIG_HEADER(config.h)
3 AM_INIT_AUTOMAKE(mono, 0.7)
16 AC_CHECK_SIZEOF(void *)
18 CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations'
20 dnl ***************************
21 dnl *** Checks for glib 1.2 ***
22 dnl ***************************
24 AC_MSG_ERROR([Cannot find GLIB: Is glib-config in path?]))
26 GLIB_CFLAGS=`glib-config --cflags glib`
27 GLIB_LIBS=`glib-config --libs glib`
32 GMODULE_CFLAGS=`glib-config --cflags gmodule`
33 GMODULE_LIBS=`glib-config --libs gmodule`
35 AC_SUBST(GMODULE_CFLAGS)
36 AC_SUBST(GMODULE_LIBS)
38 dnl *****************************
39 dnl *** Checks for libpthread ***
40 dnl *****************************
41 AC_CHECK_LIB(pthread, pthread_create, [
43 AM_CONDITIONAL(THREADS_PTHREAD, true)
44 AC_DEFINE(HAVE_PTHREAD)
46 # Need pthread_mutex_timedlock
48 orig_CPPFLAGS=$CPPFLAGS
49 # This is a gcc-specific error, but we already set gcc-specific
50 # options in CFLAGS :)
51 CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
52 AC_MSG_CHECKING(for pthread_mutex_timedlock)
53 AC_TRY_COMPILE([ #include <pthread.h>], [
54 pthread_mutex_t mut=PTHREAD_MUTEX_INITIALIZER;
55 pthread_mutex_timedlock(&mut, NULL);
59 AC_DEFINE(HAVE_PTHREAD_MUTEX_TIMEDLOCK)
63 # glibc requires -D_GNU_SOURCE before it will declare
65 AC_MSG_CHECKING(whether _GNU_SOURCE is needed for pthread_mutex_timedlock)
66 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
67 AC_TRY_COMPILE([ #include <pthread.h>], [
68 pthread_mutex_t mut=PTHREAD_MUTEX_INITIALIZER;
69 pthread_mutex_timedlock(&mut, NULL);
72 pthread_CFLAGS="-D_GNU_SOURCE"
73 AC_DEFINE(HAVE_PTHREAD_MUTEX_TIMEDLOCK)
76 dnl Add other variants here
77 #AC_MSG_ERROR(Need pthread_mutex_timedlock)
78 AC_MSG_WARN(Working around pthread_mutex_timedlock)
81 CPPFLAGS=$orig_CPPFLAGS
82 CFLAGS="$CFLAGS $pthread_CFLAGS"
84 AC_MSG_RESULT([Cannot find libpthread])
85 # Check for other thread systems here, set THREAD_LIBS to
86 # whatever is needed, and define
87 # AM_CONDITIONAL(THREADS_foo, true), and add it to the
88 # section in mono/metadata/Makefile.am, AC_DEFINE(HAVE_foo),
89 # add that to acconfig.h, add the section for that in
90 # mono/metadata/threads.h
97 #mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS;;
98 i*86-*-*) TARGET=X86; arch_target=x86;;
99 #sparc-sun-4*) TARGET=SPARC;;
100 #sparc-sun-*) TARGET=SPARC;;
101 #sparc*-*-linux*) TARGET=SPARC;;
102 #alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA;;
103 #m68k-*-linux*) TARGET=M68K;;
104 #powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC;;
105 #arm-*-linux-*) TARGET=ARM;;
108 if test ${TARGET} = unknown; then
109 CFLAGS="$CFLAGS -DNO_PORT"
110 AC_MSG_WARN("mono has not been ported to $host: some things may not work.")
113 AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
114 AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
115 AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
116 AM_CONDITIONAL(X86, test x$TARGET = xX86)
117 AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
118 AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
119 AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
120 AM_CONDITIONAL(ARM, test x$TARGET = xARM)
122 AC_SUBST(arch_target)
128 mono/metadata/Makefile
132 mono/arch/x86/Makefile
133 mono/interpreter/Makefile
135 mono/wrapper/Makefile
136 mono/monoburg/Makefile