2003-06-10 Dick Porter <dick@ximian.com>
[mono.git] / configure.in
1 AC_INIT(README)
2 AC_CANONICAL_SYSTEM
3 AM_CONFIG_HEADER(config.h)
4 AM_INIT_AUTOMAKE(mono,0.24)
5 AM_MAINTAINER_MODE
6
7 #
8 # These are the flags that need to be stored in the mono.pc file for 
9 # compiling code that will embed Mono
10 #
11 libmono_cflags=""
12 libmono_ldflags=""
13 AC_SUBST(libmono_cflags)
14 AC_SUBST(libmono_ldflags)
15
16 # Thread configuration inspired by sleepycat's db
17 AC_MSG_CHECKING([host platform characteristics])
18 libgc_threads=no
19 case "$host" in
20         *-*-mingw*|*-*-cygwin*)
21                 platform_win32=yes
22                 AC_DEFINE(PLATFORM_WIN32)
23                 CC="gcc -mno-cygwin"
24                 HOST_CC="gcc"
25                 CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS -DWIN32_THREADS"
26                 libdl=
27                 libgc_threads=win32
28                 ;;
29         *-*-*netbsd*)
30                 platform_win32=no
31                 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
32                 libmono_cflags="-D_REENTRANT"
33                 LDFLAGS="$LDFLAGS -pthread"
34                 libmono_ldflags="-pthread"
35                 AC_DEFINE(NEED_LINK_UNLINK)
36                 libdl=
37                 libgc_threads=pthreads
38                 ;;
39         *-*-*freebsd*|*-*-*openbsd*)
40                 platform_win32=no
41                 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
42                 libmono_cflags="-D_THREAD_SAFE"
43                 LDFLAGS="$LDFLAGS -pthread"
44                 libmono_ldflags="-pthread"
45                 AC_DEFINE(NEED_LINK_UNLINK)
46                 AC_DEFINE(PTHREAD_POINTER_ID)
47                 libdl=
48                 libgc_threads=pthreads
49                 ;;
50         *-*-linux*)
51                 platform_win32=no
52                 CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -DMONO_USE_EXC_TABLES -D_GNU_SOURCE -D_REENTRANT -fexceptions"
53                 libmono_cflags="-DMONO_USE_EXC_TABLES -fexceptions -D_REENTRANT"
54                 libmono_ldflags="-lpthread"
55                 libdl="-ldl"
56                 libgc_threads=pthreads
57                 ;;
58         *-*-solaris*)
59                 platform_win32=no
60                 CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT"
61                 AC_DEFINE(NEED_LINK_UNLINK)
62                 libmono_cflags="-D_REENTRANT"
63                 libgc_threads=solaris
64                 ;;
65         *-*-darwin*)
66                 platform_win32=no
67                 CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE"
68                 libmono_cflags="-D_THREAD_SAFE"
69                 LDFLAGS="$LDFLAGS -pthread"
70                 libmono_ldflags="-pthread"
71                 AC_DEFINE(NEED_LINK_UNLINK)
72                 AC_DEFINE(PTHREAD_POINTER_ID)
73                 libdl=
74                 libgc_threads=no
75                 ;;
76         *)
77                 AC_MSG_WARN([*** Please add $host to configure.in checks!])
78                 platform_win32=no
79                 libdl="-ldl"
80                 ;;
81 esac
82 AC_MSG_RESULT(ok)
83 AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
84
85 AC_CHECK_TOOL(CC, gcc, gcc)
86 AC_PROG_CC
87 AM_PROG_CC_STDC
88 AC_PROG_INSTALL
89
90 AC_CHECK_PROG(BISON, bison,yes,no)
91 if test "x$BISON" = "xno";
92 then
93         AC_MSG_ERROR([You need to install bison])
94 fi
95
96 dnl may require a specific autoconf version
97 dnl AC_PROG_CC_FOR_BUILD
98 dnl CC_FOR_BUILD not automatically detected
99 CC_FOR_BUILD=$CC
100 BUILD_EXEEXT=
101 if test "x$cross_compiling" = "xyes"; then
102         CC_FOR_BUILD=cc
103         BUILD_EXEEXT=""
104 fi
105 AC_SUBST(CC_FOR_BUILD)
106 AC_SUBST(HOST_CC)
107 AC_SUBST(BUILD_EXEEXT)
108
109 # Set STDC_HEADERS
110 AC_HEADER_STDC
111 AC_LIBTOOL_WIN32_DLL
112 AM_PROG_LIBTOOL
113
114 AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h sys/un.h)
115
116 # for mono/metadata/debug-symfile.c
117 AC_CHECK_HEADERS(elf.h)
118
119 # for mono/dis
120 AC_CHECK_HEADERS(wchar.h)
121
122 # not 64 bit clean in cross-compile
123 AC_CHECK_SIZEOF(void *, 4)
124
125 CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes  -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
126
127 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
128 if test "x$PKG_CONFIG" = "xno"; then
129         AC_MSG_ERROR([You need to install pkg-config])
130 fi
131
132 dnl for use on the build system
133 dnl pkg-config is stupid
134 BUILD_GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0`
135 BUILD_GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0`
136 AC_SUBST(BUILD_GLIB_CFLAGS)
137 AC_SUBST(BUILD_GLIB_LIBS)
138
139 PKG_PATH=
140 AC_ARG_WITH(crosspkgdir, [  --with-crosspkgdir=/path/to/pkg-config/dir],
141         if test x$with_crosspkgdir = "x"; then
142                 if test -s $PKG_CONFIG_PATH; then
143                         PKG_PATH=$PKG_CONFIG_PATH
144                 fi
145         else
146                 PKG_PATH=$with_crosspkgdir
147                 PKG_CONFIG_PATH=$PKG_PATH
148                 export PKG_CONFIG_PATH
149         fi
150 )
151
152 ## Versions of dependencies
153 GLIB_REQUIRED_VERSION=1.3.11
154
155 PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)
156
157 GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0`
158 GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0`
159 GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
160 GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
161
162 AC_SUBST(GLIB_CFLAGS)
163 AC_SUBST(GLIB_LIBS)
164 AC_SUBST(GMODULE_CFLAGS)
165 AC_SUBST(GMODULE_LIBS)
166
167 dnl
168 dnl libgc checks
169 dnl
170
171 AC_CONFIG_SUBDIRS(libgc)
172
173 gc_headers=no
174 gc=included
175 use_included_gc=no
176
177 if test -d $srcdir/libgc ; then
178   gc_default=included
179 else
180   gc_default=boehm
181 fi
182
183 AC_ARG_WITH(gc, [  --with-gc=boehm,included,none],[gc=$with_gc],[gc=$gc_default])
184
185 LIBGC_CFLAGS=
186 LIBGC_LIBS=
187 libgc_dir=
188 case "x$gc" in
189         xboehm|xbohem|xyes)
190                 AC_CHECK_HEADERS(gc.h gc/gc.h, gc_headers=yes)
191                 AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes",,$libdl)
192
193                 if test "x$found_boehm" != "xyes"; then
194                         AC_MSG_ERROR("GC requested but libgc not found!")
195                 fi
196                 if test "x$gc_headers" != "xyes"; then
197                         AC_MSG_ERROR("GC requested but header files not found! You may need to install them by hand.")
198                 fi
199
200                 AC_DEFINE(HAVE_BOEHM_GC)
201                 AC_SUBST(HAVE_BOEHM_GC)
202                 LIBGC_LIBS="-lgc $libdl"
203
204                 AC_CHECK_FUNCS(GC_gcj_malloc)
205                 ;;
206
207         xincluded)
208                 found_boehm=yes
209                 gc_headers=yes
210                 use_included_gc=yes
211                 libgc_dir=libgc
212
213                 LIBGC_CFLAGS='-I$(top_srcdir)/libgc/include'
214                 LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la'
215
216                 AC_DEFINE(HAVE_BOEHM_GC)
217                 AC_SUBST(HAVE_BOEHM_GC)
218
219                 AC_DEFINE(HAVE_GC_H)
220                 AC_DEFINE(USE_INCLUDED_LIBGC)
221
222                 # The included libgc contains GCJ support
223                 AC_DEFINE(HAVE_GC_GCJ_MALLOC)
224                 ;;
225
226         xnone)
227                 AC_MSG_WARN("Compiling mono without GC.")
228                 ;;
229         *)
230                 AC_MSG_ERROR([Invalid argument to --with-gc.])
231                 ;;
232 esac
233
234 we_are_embedded_in_mono=yes
235 export we_are_embedded_in_mono
236 export libgc_threads
237
238 AM_CONDITIONAL(INCLUDED_LIBGC, test x$use_included_gc = xyes)
239 AC_SUBST(LIBGC_CFLAGS)
240 AC_SUBST(LIBGC_LIBS)
241 AC_SUBST(libgc_dir)
242
243 dnl
244 dnl End of libgc checks
245 dnl
246
247 if test x$platform_win32 = xno; then
248         dnl ******************************************************************
249         dnl *** Check for large file support                               ***
250         dnl *** (If we were using autoconf 2.50 we'd use AC_SYS_LARGEFILE) ***
251         dnl ******************************************************************
252         
253         # Check that off_t can represent 2**63 - 1 correctly, working around
254         # potential compiler bugs.  Defines LARGE_FILE_SUPPORT, adds $1 to
255         # CPPFLAGS and sets $large_offt to yes if the test succeeds
256         large_offt=no
257         AC_DEFUN(LARGE_FILES, [
258                 large_CPPFLAGS=$CPPFLAGS
259                 CPPFLAGS="$CPPFLAGS $1"
260                 AC_TRY_RUN([
261                         #include <sys/types.h>
262
263                         #define BIG_OFF_T (((off_t)1<<62)-1+((off_t)1<<62))
264
265                         int main(void) {
266                                 int big_off_t=((BIG_OFF_T%2147483629==721) &&
267                                                (BIG_OFF_T%2147483647==1));
268                                 if(big_off_t) {
269                                         exit(0);
270                                 } else {
271                                         exit(1);
272                                 }
273                         }
274                 ], [
275                         AC_MSG_RESULT(ok)
276                         AC_DEFINE(HAVE_LARGE_FILE_SUPPORT)
277                         large_CPPFLAGS="$large_CPPFLAGS $1"
278                         large_offt=yes
279                 ], [
280                         AC_MSG_RESULT(no)
281                 ], "")
282                 CPPFLAGS=$large_CPPFLAGS
283         ])
284
285         AC_MSG_CHECKING(if off_t is 64 bits wide)
286         LARGE_FILES("")
287         if test $large_offt = no; then
288                 AC_MSG_CHECKING(if _FILE_OFFSET_BITS=64 gives 64 bit off_t)
289                 LARGE_FILES("-D_FILE_OFFSET_BITS=64")
290         fi
291         if test $large_offt = no; then
292                 AC_MSG_WARN([No 64 bit file size support available])
293         fi
294         
295         dnl *****************************
296         dnl *** Checks for libsocket  ***
297         dnl *****************************
298         AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
299
300         dnl *******************************
301         dnl *** Checks for MSG_NOSIGNAL ***
302         dnl *******************************
303         AC_MSG_CHECKING(for MSG_NOSIGNAL)
304         AC_TRY_COMPILE([#include <sys/socket.h>], [
305                 int f = MSG_NOSIGNAL;
306         ], [
307                 # Yes, we have it...
308                 AC_MSG_RESULT(yes)
309                 AC_DEFINE(HAVE_MSG_NOSIGNAL)
310         ], [
311                 # We'll have to use signals
312                 AC_MSG_RESULT(no)
313         ])
314
315         dnl *****************************
316         dnl *** Checks for SOL_IP     ***
317         dnl *****************************
318         AC_MSG_CHECKING(for SOL_IP)
319         AC_TRY_COMPILE([#include <netdb.h>], [
320                 int level = SOL_IP;
321         ], [
322                 # Yes, we have it...
323                 AC_MSG_RESULT(yes)
324                 AC_DEFINE(HAVE_SOL_IP)
325         ], [
326                 # We'll have to use getprotobyname
327                 AC_MSG_RESULT(no)
328         ])
329
330         dnl *****************************
331         dnl *** Checks for SOL_TCP    ***
332         dnl *****************************
333         AC_MSG_CHECKING(for SOL_TCP)
334         AC_TRY_COMPILE([#include <netdb.h>], [
335                 int level = SOL_TCP;
336         ], [
337                 # Yes, we have it...
338                 AC_MSG_RESULT(yes)
339                 AC_DEFINE(HAVE_SOL_TCP)
340         ], [
341                 # We'll have to use getprotobyname
342                 AC_MSG_RESULT(no)
343         ])
344
345         dnl *****************************
346         dnl *** Checks for IP_PKTINFO ***
347         dnl *****************************
348         AC_MSG_CHECKING(for IP_PKTINFO)
349         AC_TRY_COMPILE([#include <netdb.h>], [
350                 int level = IP_PKTINFO;
351         ], [
352                 # Yes, we have it...
353                 AC_MSG_RESULT(yes)
354                 AC_DEFINE(HAVE_IP_PKTINFO)
355         ], [
356                 AC_MSG_RESULT(no)
357         ])
358
359         dnl *********************************
360         dnl *** Check for struct ip_mreqn ***
361         dnl *********************************
362         AC_MSG_CHECKING(for struct ip_mreqn)
363         AC_TRY_COMPILE([#include <netinet/in.h>], [
364                 struct ip_mreqn mreq;
365                 mreq.imr_address.s_addr = 0;
366         ], [
367                 # Yes, we have it...
368                 AC_MSG_RESULT(yes)
369                 AC_DEFINE(HAVE_STRUCT_IP_MREQN)
370         ], [
371                 # We'll just have to try and use struct ip_mreq
372                 AC_MSG_RESULT(no)
373                 AC_MSG_CHECKING(for struct ip_mreq)
374                 AC_TRY_COMPILE([#include <netinet/in.h>], [
375                         struct ip_mreq mreq;
376                         mreq.imr_interface.s_addr = 0;
377                 ], [
378                         # Yes, we have it...
379                         AC_MSG_RESULT(yes)
380                         AC_DEFINE(HAVE_STRUCT_IP_MREQ)
381                 ], [
382                         # No multicast support
383                         AC_MSG_RESULT(no)
384                 ])
385         ])
386
387         dnl *****************************
388         dnl *** Checks for libnsl     ***
389         dnl *****************************
390         AC_CHECK_LIB(nsl, gethostbyaddr, LIBS="$LIBS -lnsl")
391
392         AC_CHECK_FUNCS(inet_pton inet_aton)
393
394         dnl ***********************************************
395         dnl *** Checks for size of sockaddr_un.sun_path ***
396         dnl ***********************************************
397         # AC_CHECK_SIZEOF can't cope with struct members :-(
398         AC_MSG_CHECKING(size of sockaddr_un.sun_path)
399         AC_CACHE_VAL(cv_mono_sizeof_sunpath,
400                 [AC_TRY_RUN([
401                         #include <sys/types.h>
402                         #include <stdio.h>
403                         #include <sys/un.h>
404
405                         int main(void) {
406                                 struct sockaddr_un sock_un;
407                                 FILE *f=fopen("conftestval", "w");
408                                 if(!f) exit(1);
409                                 fprintf(f, "%d\n", sizeof(sock_un.sun_path));
410                                 exit(0);
411                         }
412                 ], cv_mono_sizeof_sunpath=`cat conftestval`,
413                    cv_mono_sizeof_sunpath=0,
414                    cv_mono_sizeof_sunpath=0)])dnl
415         AC_MSG_RESULT($cv_mono_sizeof_sunpath)
416         AC_DEFINE_UNQUOTED(MONO_SIZEOF_SUNPATH, $cv_mono_sizeof_sunpath)
417
418         dnl *****************************
419         dnl *** Checks for libxnet    ***
420         dnl *****************************
421         case "${host}" in
422                 *solaris* )
423                         AC_MSG_CHECKING(for Solaris XPG4 support)
424                         if test -f /usr/lib/libxnet.so; then
425                                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
426                                 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
427                                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED=1"
428                                 LIBS="$LIBS -lxnet"
429                                 AC_MSG_RESULT(yes)
430                         else
431                                 AC_MSG_RESULT(no)
432                         fi
433
434                         if test "$GCC" = "yes"; then
435                                 CFLAGS="$CFLAGS -Wno-char-subscripts"
436                         fi
437                 ;;
438         esac
439
440         dnl *****************************
441         dnl *** Checks for libpthread ***
442         dnl *****************************
443         AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread")
444         AC_CHECK_FUNCS(pthread_mutex_timedlock)
445         AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
446         AC_TRY_COMPILE([ #include <pthread.h>], [
447                 pthread_mutexattr_t attr;
448                 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
449         ], [
450                 AC_MSG_RESULT(ok)
451         ], [
452                 AC_MSG_RESULT(no)
453                 AC_MSG_WARN(Using mono_mutex_t for recursive mutexes)
454                 AC_DEFINE(USE_MONO_MUTEX)
455         ])
456
457         dnl ********************************
458         dnl *** Checks for semaphore lib ***
459         dnl ********************************
460         AC_CHECK_LIB(rt, sem_init, LIBS="$LIBS -lrt")
461
462         dnl ********************************
463         dnl *** Checks for timezone stuff **
464         dnl ********************************
465         AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
466                 AC_TRY_COMPILE([
467                         #include <time.h>
468                         ], [
469                         struct tm tm;
470                         tm.tm_gmtoff = 1;
471                         ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
472         if test $ac_cv_struct_tm_gmtoff = yes; then
473                 AC_DEFINE(HAVE_TM_GMTOFF)
474         else
475                 AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
476                         AC_TRY_COMPILE([
477                                 #include <time.h>
478                         ], [
479                                 timezone = 1;
480                         ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
481                 if test $ac_cv_var_timezone = yes; then
482                         AC_DEFINE(HAVE_TIMEZONE)
483                 else
484                         AC_ERROR(unable to find a way to determine timezone)
485                 fi
486         fi
487 else
488         AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
489         AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?))
490 fi
491
492 dnl ****************************
493 dnl *** Look for /dev/random ***
494 dnl ****************************
495
496 AC_MSG_CHECKING([if usage of random device is requested])
497 AC_ARG_ENABLE(dev-random,
498 [  --disable-dev-random    disable the use of the random device],
499 try_dev_random=$enableval, try_dev_random=yes)
500 AC_MSG_RESULT($try_dev_random)
501
502 case "{$target}" in
503     *-openbsd*)
504     NAME_DEV_RANDOM="/dev/srandom"
505     ;;
506
507 dnl Win32 does not have /dev/random, they have their own method...
508
509     *-*-mingw*|*-*-cygwin*)
510     ac_cv_have_dev_random = no
511     ;;
512
513 dnl Everywhere else, it's /dev/random
514
515     *)
516     NAME_DEV_RANDOM="/dev/random"
517     ;;
518 esac
519
520 AC_DEFINE_UNQUOTED(NAME_DEV_RANDOM, "$NAME_DEV_RANDOM")
521
522 dnl Now check if the device actually exists
523
524 if test "x$try_dev_random" = "xyes"; then
525     AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
526     [if test -r "$NAME_DEV_RANDOM" ; then
527         ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
528     if test "x$ac_cv_have_dev_random" = "xyes"; then
529         AC_DEFINE(HAVE_CRYPT_RNG)
530     fi
531 else
532     AC_MSG_CHECKING(for random device)
533     ac_cv_have_dev_random=no
534     AC_MSG_RESULT(has been disabled)
535 fi
536
537 if test "x$platform_win32" = "xyes"; then
538     AC_DEFINE(HAVE_CRYPT_RNG)
539 fi
540
541 if test "x$ac_cv_have_dev_random" = "xno" \
542     && test "x$platform_win32" = "xno"; then
543     AC_MSG_WARN([[
544 ***
545 *** A system-provided entropy source was not found on this system.
546 *** Because of this, the System.Security.Cryptography random number generator
547 *** will throw a NotImplemented exception.
548 ***
549 *** If you are seeing this message, and you know your system DOES have an
550 *** entropy collection in place, please contact <crichton@gimp.org> and
551 *** provide information about the system and how to access the random device.
552 ***
553 *** For those systems who lack a random device, EGD support is forthcoming.
554 ***]])
555 fi
556  
557 AC_MSG_CHECKING([if inter-process shared handles are requested])
558 AC_ARG_ENABLE(shared-handles, [  --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=yes)
559 AC_MSG_RESULT($try_shared_handles)
560 if test "x$try_shared_handles" != "xyes"; then
561         AC_DEFINE(DISABLE_SHARED_HANDLES)
562         AC_SUBST(DISABLE_SHARED_HANDLES)
563 fi
564
565 TARGET="unknown"
566 ACCESS_UNALIGNED="yes"
567
568 JIT_SUPPORTED=no
569
570 case "$host" in
571 #mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS; ACCESS_UNALIGNED="no";;
572 i*86-*-*) TARGET=X86; arch_target=x86; JIT_SUPPORTED=yes;;
573 sparc*-*-*) TARGET=SPARC; arch_target=sparc; ACCESS_UNALIGNED="no";;
574 #alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA; ACCESS_UNALIGNED="no";;
575 #m68k-*-linux*) TARGET=M68K;;
576 macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | powerpc-*-sysv* | powerpc-*-darwin*) TARGET=POWERPC; arch_target=ppc; JIT_SUPPORTED=yes;;
577 arm-*-linux-* | armv4l-*-linux-*) TARGET=ARM; arch_target=arm; ACCESS_UNALIGNED="no";;
578 s390-*-linux*) TARGET=S390; arch_target=s390; ACCESS_UNALIGNED="no";;
579 esac
580
581 if test ${TARGET} = unknown; then
582         CPPFLAGS="$CPPFLAGS -DNO_PORT"
583         AC_MSG_WARN("mono has not been ported to $host: some things may not work.")
584 fi
585
586 if test ${ACCESS_UNALIGNED} = no; then
587         CPPFLAGS="$CPPFLAGS -DNO_UNALIGNED_ACCESS"
588 fi
589
590 AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
591 AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
592 AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
593 AM_CONDITIONAL(X86, test x$TARGET = xX86)
594 AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
595 AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
596 AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
597 AM_CONDITIONAL(ARM, test x$TARGET = xARM)
598 AM_CONDITIONAL(S390, test x$TARGET = xS390)
599
600 AM_CONDITIONAL(JIT_SUPPORTED, test x$JIT_SUPPORTED = xyes)
601
602 LIBC="libc.so.6"
603 AC_SUBST(LIBC)
604
605 AC_SUBST(arch_target)
606 AC_SUBST(CFLAGS)
607 AC_SUBST(CPPFLAGS)
608 AC_SUBST(LDFLAGS)
609
610 AC_OUTPUT([
611 Makefile
612 mono.pc
613 mono/Makefile
614 mono/utils/Makefile
615 mono/metadata/Makefile
616 mono/dis/Makefile
617 mono/cil/Makefile
618 mono/arch/Makefile
619 mono/os/Makefile
620 mono/os/win32/Makefile
621 mono/os/unix/Makefile
622 mono/arch/x86/Makefile
623 mono/arch/ppc/Makefile
624 mono/arch/sparc/Makefile
625 mono/arch/s390/Makefile
626 mono/arch/arm/Makefile
627 mono/arch/alpha/Makefile
628 mono/interpreter/Makefile
629 mono/tests/Makefile
630 mono/benchmark/Makefile
631 mono/monoburg/Makefile
632 mono/monograph/Makefile
633 mono/io-layer/Makefile
634 mono/handles/Makefile
635 mono/mini/Makefile
636 runtime/Makefile
637 scripts/Makefile
638 man/Makefile
639 doc/Makefile
640 docs/Makefile
641 data/Makefile
642 mono.spec
643 ])
644
645 echo "
646
647         GC:     $gc
648
649 "