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_WARN(Working around pthread_mutex_timedlock)
80 CPPFLAGS=$orig_CPPFLAGS
81 CFLAGS="$CFLAGS $pthread_CFLAGS"
83 AC_MSG_RESULT([Cannot find libpthread])
84 # Check for other thread systems here, set THREAD_LIBS to
85 # whatever is needed, and define
86 # AM_CONDITIONAL(THREADS_foo, true), and add it to the
87 # section in mono/metadata/Makefile.am, AC_DEFINE(HAVE_foo),
88 # add that to acconfig.h, add the section for that in
89 # mono/metadata/threads.h
96 #mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS;;
97 i*86-*-*) TARGET=X86; arch_target=x86;;
98 #sparc-sun-4*) TARGET=SPARC;;
99 #sparc-sun-*) TARGET=SPARC;;
100 #sparc*-*-linux*) TARGET=SPARC;;
101 #alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA;;
102 #m68k-*-linux*) TARGET=M68K;;
103 #powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC;;
104 #arm-*-linux-*) TARGET=ARM;;
107 if test ${TARGET} = unknown; then
108 CFLAGS="$CFLAGS -DNO_PORT"
109 AC_MSG_WARN("mono has not been ported to $host: some things may not work.")
112 AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
113 AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
114 AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
115 AM_CONDITIONAL(X86, test x$TARGET = xX86)
116 AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
117 AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
118 AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
119 AM_CONDITIONAL(ARM, test x$TARGET = xARM)
121 AC_SUBST(arch_target)
127 mono/metadata/Makefile
131 mono/arch/x86/Makefile
132 mono/interpreter/Makefile
134 mono/wrapper/Makefile
135 mono/monoburg/Makefile