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