build fix
[mono-project.git] / configure.in
blob962304855f6fe43eae8f723fe26ae5b09c8e99c8
1 AC_INIT(README)
2 AC_CANONICAL_SYSTEM
3 AM_CONFIG_HEADER(config.h)
4 AM_INIT_AUTOMAKE(mono,1.0)
5 AM_MAINTAINER_MODE
7 AC_PROG_LN_S
9 dnl
10 dnl libgc checks
11 dnl
13 gc_headers=no
14 gc=included
15 use_included_gc=no
17 if test -d $srcdir/libgc ; then
18   gc_default=included
19 else
20   gc_default=boehm
24 # These are the flags that need to be stored in the mono.pc file for 
25 # compiling code that will embed Mono
27 libmono_cflags=""
28 libmono_ldflags=""
29 AC_SUBST(libmono_cflags)
30 AC_SUBST(libmono_ldflags)
32 dnl if linker handles the version script
33 no_version_script=no
35 # Set to yes if Unix sockets cannot be created in an anonymous namespace
36 need_link_unlink=no
38 # Thread configuration inspired by sleepycat's db
39 AC_MSG_CHECKING([host platform characteristics])
40 libgc_threads=no
41 case "$host" in
42         *-*-mingw*|*-*-cygwin*)
43                 platform_win32=yes
44                 AC_DEFINE(PLATFORM_WIN32,1,[Platform is Win32])
45                 CC="gcc -mno-cygwin"
46                 HOST_CC="gcc"
47                 # So libgc configure gets -mno-cygwin
48                 export CC
49 # latest libgc already defines GC_WIN32_THREADS
50 #               CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS -DWIN32_THREADS"
51                 CPPFLAGS="$CPPFLAGS -DWIN32_THREADS"
52                 libdl=
53                 libgc_threads=win32
54                 gc_default=boehm 
55                 with_nptl=no
56                 with_sigaltstack=no
57                 LN_S=cp
59                 ;;
60         *-*-*netbsd*)
61                 platform_win32=no
62                 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
63                 libmono_cflags="-D_REENTRANT"
64                 LDFLAGS="$LDFLAGS -pthread"
65                 libmono_ldflags="-pthread"
66                 need_link_unlink=yes
67                 libdl=
68                 libgc_threads=no
69                 ;;
70         *-*-*freebsd*|*-*-*openbsd*)
71                 platform_win32=no
72                 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
73                 libmono_cflags="-D_THREAD_SAFE"
74                 LDFLAGS="$LDFLAGS -pthread"
75                 libmono_ldflags="-pthread"
76                 need_link_unlink=yes
77                 AC_DEFINE(PTHREAD_POINTER_ID)
78                 libdl=
79                 libgc_threads=pthreads
80                 ;;
81         *-*-linux*)
82                 platform_win32=no
83                 CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT"
84                 libmono_cflags="-D_REENTRANT"
85                 libmono_ldflags="-lpthread"
86                 libdl="-ldl"
87                 libgc_threads=pthreads
88                 ;;
89         *-*-hpux*)
90                 platform_win32=no
91                 CPPFLAGS="$CPPFLAGS -DGC_HPUX_THREADS -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_REENTRANT"
92                 CFLAGS="$CFLAGS +ESdbgasm"
93                 LDFLAGS="$LDFLAGS -z"
94                 libmono_cflags="-D_REENTRANT"
95                 libmono_ldflags="-lpthread"
96                 libgc_threads=pthreads
97                 need_link_unlink=yes
98                 ;;
99         *-*-solaris*)
100                 platform_win32=no
101                 CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT"
102                 need_link_unlink=yes
103                 libmono_cflags="-D_REENTRANT"
104                 libgc_threads=pthreads
105                 ;;
106         *-*-darwin*)
107                 platform_win32=no
108                 CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE -DGC_MACOSX_THREADS"
109                 libmono_cflags="-D_THREAD_SAFE"
110                 LDFLAGS="$LDFLAGS -pthread"
111                 libmono_ldflags="-pthread"
112                 need_link_unlink=yes
113                 AC_DEFINE(PTHREAD_POINTER_ID)
114                 AC_DEFINE(USE_MACH_SEMA)
115                 no_version_script=yes
116                 libdl=
117                 libgc_threads=pthreads
118                 ;;
119         *)
120                 AC_MSG_WARN([*** Please add $host to configure.in checks!])
121                 platform_win32=no
122                 libdl="-ldl"
123                 ;;
124 esac
125 AC_MSG_RESULT(ok)
127 if test x$need_link_unlink = xyes; then
128    AC_DEFINE(NEED_LINK_UNLINK, 1, [Define if Unix sockets cannot be created in an anonymous namespace])
131 AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
133 AC_CHECK_TOOL(CC, gcc, gcc)
134 AC_PROG_CC
135 AM_PROG_CC_STDC
136 AC_PROG_INSTALL
137 dnl We should use AM_PROG_AS, but it's not available on automake/aclocal 1.4
138 : ${CCAS='$(CC)'}
139 # Set ASFLAGS if not already set.
140 : ${CCASFLAGS='$(CFLAGS)'}
141 AC_SUBST(CCAS)
142 AC_SUBST(CCASFLAGS)
144 AC_CHECK_PROG(BISON, bison,yes,no)
145 if test "x$BISON" = "xno";
146 then
147         AC_MSG_ERROR([You need to install bison])
150 dnl may require a specific autoconf version
151 dnl AC_PROG_CC_FOR_BUILD
152 dnl CC_FOR_BUILD not automatically detected
153 CC_FOR_BUILD=$CC
154 BUILD_EXEEXT=
155 if test "x$cross_compiling" = "xyes"; then
156         CC_FOR_BUILD=cc
157         BUILD_EXEEXT=""
159 AC_SUBST(CC_FOR_BUILD)
160 AC_SUBST(HOST_CC)
161 AC_SUBST(BUILD_EXEEXT)
163 # Set STDC_HEADERS
164 AC_HEADER_STDC
165 AC_LIBTOOL_WIN32_DLL
166 AM_PROG_LIBTOOL
168 # Test whenever ld supports -version-script
169 AC_PROG_LD
170 AC_PROG_LD_GNU
171 if test "x$lt_cv_prog_gnu_ld" = "xno"; then
172    no_version_script=yes
175 AM_CONDITIONAL(NO_VERSION_SCRIPT, test x$no_version_script = xyes)
177 AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h sys/un.h)
179 # for mono/mini/tramp-x86.c
180 AC_CHECK_HEADERS(valgrind/memcheck.h)
182 # for mono/metadata/debug-symfile.c
183 AC_CHECK_HEADERS(elf.h)
185 # for mono/dis
186 AC_CHECK_HEADERS(wchar.h)
188 # not 64 bit clean in cross-compile
189 AC_CHECK_SIZEOF(void *, 4)
191 WARN=''
192 if test x"$GCC" = xyes; then
193         WARN='-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes  -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
194                 # The runtime code does not respect ANSI C strict aliasing rules
195                 CFLAGS="$CFLAGS -fno-strict-aliasing"
196 else
197         # The Sun Forte compiler complains about inline functions that access static variables
198         # so disable all inlining.
199         case "$host" in
200         *-*-solaris*)
201                 CFLAGS="$CFLAGS -Dinline="
202                 ;;
203         esac
205 CFLAGS="$CFLAGS -g $WARN"
207 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
208 if test "x$PKG_CONFIG" = "xno"; then
209         AC_MSG_ERROR([You need to install pkg-config])
212 dnl for use on the build system
213 dnl pkg-config is stupid
214 BUILD_GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
215 BUILD_GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
216 AC_SUBST(BUILD_GLIB_CFLAGS)
217 AC_SUBST(BUILD_GLIB_LIBS)
219 PKG_PATH=
220 AC_ARG_WITH(crosspkgdir, [  --with-crosspkgdir=/path/to/pkg-config/dir],
221         if test x$with_crosspkgdir = "x"; then
222                 if test -s $PKG_CONFIG_PATH; then
223                         PKG_PATH=$PKG_CONFIG_PATH
224                 fi
225         else
226                 PKG_PATH=$with_crosspkgdir
227                 PKG_CONFIG_PATH=$PKG_PATH
228                 export PKG_CONFIG_PATH
229         fi
232 ## Versions of dependencies
233 GLIB_REQUIRED_VERSION=1.3.11
235 PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)
237 GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
238 GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
239 GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
240 GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
242 AC_SUBST(GLIB_CFLAGS)
243 AC_SUBST(GLIB_LIBS)
244 AC_SUBST(GMODULE_CFLAGS)
245 AC_SUBST(GMODULE_LIBS)
247 AC_ARG_WITH(gc, [  --with-gc=boehm,included,none],[gc=$with_gc],[gc=$gc_default])
249 # Enable support for fast thread-local storage
250 # Some systems have broken support, so we allow to disable it.
251 AC_ARG_WITH(tls, [  --with-tls=__thread,pthread       select Thread Local Storage implementation],[],[with_tls=__thread])
253 # Kept for compatibility
254 AC_ARG_WITH(nptl, [  --with-nptl=yes,no      deprecated, use --with-tls instead],[],[with_nptl=default])
256 if test "x$with_nptl" != "xdefault"; then
257    if test "x$with_nptl" = "xyes"; then
258       AC_MSG_WARN([--with-nptl=yes is deprecated, use --with-tls=__thread option instead.])
259           with_tls=__thread
260    fi
261    if test "x$with_nptl" = "xno"; then
262       AC_MSG_WARN([--with-nptl=no is deprecated, use --with-tls=pthread option instead.])
263           with_tls=pthread
264    fi
267 # Enable support for using sigaltstack for SIGSEGV and stack overflow handling
268 # This does not work on some platforms (bug #55253)
269 AC_ARG_WITH(sigaltstack, [  --with-sigaltstack=yes,no      enable/disable support for sigaltstack],[],[with_sigaltstack=no])
271 # assembly bundle support, see metadata/make-bundle.pl for more info
272 AC_ARG_WITH(bundle, [  --with-bundle=bundle_template],[
273         BUNDLE_FILE=$with_bundle
274         AC_SUBST(BUNDLE_FILE)
275         AC_DEFINE(WITH_BUNDLE)
276 ],[with_bundle=no])
277 AM_CONDITIONAL(WITH_BUNDLE, test x$with_bundle != xno)
279 LIBGC_CFLAGS=
280 LIBGC_LIBS=
281 libgc_dir=
282 case "x$gc" in
283         xboehm|xbohem|xyes)
284                 AC_CHECK_HEADERS(gc.h gc/gc.h, gc_headers=yes)
285                 AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes",,$libdl)
287                 if test "x$found_boehm" != "xyes"; then
288                         AC_MSG_ERROR("GC requested but libgc not found! Install libgc or run configure with --with-gc=none.")
289                 fi
290                 if test "x$gc_headers" != "xyes"; then
291                         AC_MSG_ERROR("GC requested but header files not found! You may need to install them by hand.")
292                 fi
294                 AC_DEFINE(HAVE_BOEHM_GC)
295                 AC_SUBST(HAVE_BOEHM_GC)
296                 LIBGC_LIBS="-lgc $libdl"
298                 # AC_CHECK_FUNCS does not work for some reason...
299                 AC_CHECK_LIB(gc, GC_gcj_malloc, found_gcj_malloc="yes",,$libdl)
300                 if test "x$found_gcj_malloc" = "xyes"; then
301                         AC_DEFINE(HAVE_GC_GCJ_MALLOC)
302                 fi
303                 AC_CHECK_LIB(gc, GC_enable, found_gc_enable="yes",,$libdl)
304                 if test "x$found_gc_enable" = "xyes"; then
305                         AC_DEFINE(HAVE_GC_ENABLE)
306                 fi
307                 ;;
309         xincluded)
310                 AC_CONFIG_SUBDIRS(libgc)
312                 found_boehm=yes
313                 gc_headers=yes
314                 use_included_gc=yes
315                 libgc_dir=libgc
317                 LIBGC_CFLAGS='-I$(top_srcdir)/libgc/include'
318                 LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la'
320                 AC_DEFINE(HAVE_BOEHM_GC)
321                 AC_SUBST(HAVE_BOEHM_GC)
323                 AC_DEFINE(HAVE_GC_H)
324                 AC_DEFINE(USE_INCLUDED_LIBGC)
326                 # The included libgc contains GCJ support
327                 AC_DEFINE(HAVE_GC_GCJ_MALLOC)
328                 AC_DEFINE(HAVE_GC_ENABLE)
329                 ;;
331         xnone)
332                 AC_MSG_WARN("Compiling mono without GC.")
333                 ;;
334         *)
335                 AC_MSG_ERROR([Invalid argument to --with-gc.])
336                 ;;
337 esac
340 # tell libgc/configure about what we want
341 ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads"
343 AM_CONDITIONAL(INCLUDED_LIBGC, test x$use_included_gc = xyes)
344 AC_SUBST(LIBGC_CFLAGS)
345 AC_SUBST(LIBGC_LIBS)
346 AC_SUBST(libgc_dir)
349 dnl End of libgc checks
352 if test x$platform_win32 = xno; then
354         dnl ******************************************************************
355         dnl *** Checks for the IKVM JNI interface library                  ***
356         dnl ******************************************************************
357         AC_ARG_WITH(ikvm-jni, [  --with-ikvm-jni=yes,no  build the IKVM JNI interface library],[with_ikvm_jni=$withval],[with_ikvm_jni=yes])
358         AC_ARG_WITH(jdk, [  --with-jdk=DIRECTORY    Use JDK from DIRECTORY],[with_jdk_dir=$withval],[with_jdk_dir=])
360         ikvm_jni_dir=
361         if test x$with_ikvm_jni = xyes; then
362                 AC_MSG_CHECKING([JDK headers])
364                 if test x$with_jdk_dir = x; then
365                         # Try JAVA_HOME variable
366                         if test x$JAVA_HOME != x; then
367                                 with_jdk_dir=$JAVA_HOME
368                         fi
369                 fi
370         
371                 jdk_platform=
372                 if test -d $with_jdk_dir/include; then
373                         jdk_headers_found=yes
375                         if test -d $with_jdk_dir/include/linux; then
376                                 jdk_platform=linux
377                         else
378                         if test -d $with_jdk_dir/include/solaris; then
379                                 jdk_platform=solaris
380                         else
381                         if test -f $with_jdk_dir/include/jni_md.h; then
382                                 # GNU Classpath sources
383                                 jdk_platform=
384                         else
385                                 jdk_headers_found=no
386                         fi
387                         fi
388                         fi
389                 else
390                         jdk_headers_found=no
391                 fi
393                 if test x$jdk_headers_found = xyes; then
394                         AC_MSG_RESULT($with_jdk_dir/include $with_jdk_dir/include/$jdk_platform)
395                 else
396                         AC_MSG_RESULT(not found)
397                 fi
399                 if test x$jdk_headers_found = xyes; then
400                         ikvm_jni_dir=ikvm-jni
401                         IKVM_JNI_CFLAGS="-I$with_jdk_dir/include -I$with_jdk_dir/include/$jdk_platform"
402                 fi
403         fi
405         AC_SUBST(ikvm_jni_dir)
406         AC_SUBST(IKVM_JNI_CFLAGS)
408         AC_CHECK_FUNCS(getgrgid_r)
409         AC_CHECK_FUNCS(getgrnam_r)
410         AC_CHECK_FUNCS(getpwnam_r)
411         AC_CHECK_FUNCS(getpwuid_r)
412         AC_CHECK_FUNCS(getresuid)
413         AC_CHECK_FUNCS(setresuid)
415         dnl ******************************************************************
416         dnl *** Check for large file support                               ***
417         dnl *** (If we were using autoconf 2.50 we'd use AC_SYS_LARGEFILE) ***
418         dnl ******************************************************************
419         
420         # Check that off_t can represent 2**63 - 1 correctly, working around
421         # potential compiler bugs.  Defines LARGE_FILE_SUPPORT, adds $1 to
422         # CPPFLAGS and sets $large_offt to yes if the test succeeds
423         large_offt=no
424         AC_DEFUN(LARGE_FILES, [
425                 large_CPPFLAGS=$CPPFLAGS
426                 CPPFLAGS="$CPPFLAGS $1"
427                 AC_TRY_RUN([
428                         #include <sys/types.h>
430                         #define BIG_OFF_T (((off_t)1<<62)-1+((off_t)1<<62))
432                         int main(void) {
433                                 int big_off_t=((BIG_OFF_T%2147483629==721) &&
434                                                (BIG_OFF_T%2147483647==1));
435                                 if(big_off_t) {
436                                         exit(0);
437                                 } else {
438                                         exit(1);
439                                 }
440                         }
441                 ], [
442                         AC_MSG_RESULT(ok)
443                         AC_DEFINE(HAVE_LARGE_FILE_SUPPORT)
444                         large_CPPFLAGS="$large_CPPFLAGS $1"
445                         large_offt=yes
446                 ], [
447                         AC_MSG_RESULT(no)
448                 ], "")
449                 CPPFLAGS=$large_CPPFLAGS
450         ])
452         AC_MSG_CHECKING(if off_t is 64 bits wide)
453         LARGE_FILES("")
454         if test $large_offt = no; then
455                 AC_MSG_CHECKING(if _FILE_OFFSET_BITS=64 gives 64 bit off_t)
456                 LARGE_FILES("-D_FILE_OFFSET_BITS=64")
457         fi
458         if test $large_offt = no; then
459                 AC_MSG_WARN([No 64 bit file size support available])
460         fi
461         
462         dnl *****************************
463         dnl *** Checks for libsocket  ***
464         dnl *****************************
465         AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
467         dnl *******************************
468         dnl *** Checks for MSG_NOSIGNAL ***
469         dnl *******************************
470         AC_MSG_CHECKING(for MSG_NOSIGNAL)
471         AC_TRY_COMPILE([#include <sys/socket.h>], [
472                 int f = MSG_NOSIGNAL;
473         ], [
474                 # Yes, we have it...
475                 AC_MSG_RESULT(yes)
476                 AC_DEFINE(HAVE_MSG_NOSIGNAL)
477         ], [
478                 # We'll have to use signals
479                 AC_MSG_RESULT(no)
480         ])
482         dnl *****************************
483         dnl *** Checks for SOL_IP     ***
484         dnl *****************************
485         AC_MSG_CHECKING(for SOL_IP)
486         AC_TRY_COMPILE([#include <netdb.h>], [
487                 int level = SOL_IP;
488         ], [
489                 # Yes, we have it...
490                 AC_MSG_RESULT(yes)
491                 AC_DEFINE(HAVE_SOL_IP)
492         ], [
493                 # We'll have to use getprotobyname
494                 AC_MSG_RESULT(no)
495         ])
497         dnl *****************************
498         dnl *** Checks for SOL_IPV6     ***
499         dnl *****************************
500         AC_MSG_CHECKING(for SOL_IPV6)
501         AC_TRY_COMPILE([#include <netdb.h>], [
502                 int level = SOL_IPV6;
503         ], [
504                 # Yes, we have it...
505                 AC_MSG_RESULT(yes)
506                 AC_DEFINE(HAVE_SOL_IPV6)
507         ], [
508                 # We'll have to use getprotobyname
509                 AC_MSG_RESULT(no)
510         ])
512         dnl *****************************
513         dnl *** Checks for SOL_TCP    ***
514         dnl *****************************
515         AC_MSG_CHECKING(for SOL_TCP)
516         AC_TRY_COMPILE([#include <netdb.h>], [
517                 int level = SOL_TCP;
518         ], [
519                 # Yes, we have it...
520                 AC_MSG_RESULT(yes)
521                 AC_DEFINE(HAVE_SOL_TCP)
522         ], [
523                 # We'll have to use getprotobyname
524                 AC_MSG_RESULT(no)
525         ])
527         dnl *****************************
528         dnl *** Checks for IP_PKTINFO ***
529         dnl *****************************
530         AC_MSG_CHECKING(for IP_PKTINFO)
531         AC_TRY_COMPILE([#include <netdb.h>], [
532                 int level = IP_PKTINFO;
533         ], [
534                 # Yes, we have it...
535                 AC_MSG_RESULT(yes)
536                 AC_DEFINE(HAVE_IP_PKTINFO)
537         ], [
538                 AC_MSG_RESULT(no)
539         ])
541         dnl *********************************
542         dnl *** Check for struct ip_mreqn ***
543         dnl *********************************
544         AC_MSG_CHECKING(for struct ip_mreqn)
545         AC_TRY_COMPILE([#include <netinet/in.h>], [
546                 struct ip_mreqn mreq;
547                 mreq.imr_address.s_addr = 0;
548         ], [
549                 # Yes, we have it...
550                 AC_MSG_RESULT(yes)
551                 AC_DEFINE(HAVE_STRUCT_IP_MREQN)
552         ], [
553                 # We'll just have to try and use struct ip_mreq
554                 AC_MSG_RESULT(no)
555                 AC_MSG_CHECKING(for struct ip_mreq)
556                 AC_TRY_COMPILE([#include <netinet/in.h>], [
557                         struct ip_mreq mreq;
558                         mreq.imr_interface.s_addr = 0;
559                 ], [
560                         # Yes, we have it...
561                         AC_MSG_RESULT(yes)
562                         AC_DEFINE(HAVE_STRUCT_IP_MREQ)
563                 ], [
564                         # No multicast support
565                         AC_MSG_RESULT(no)
566                 ])
567         ])
568         
569         dnl **********************************
570         dnl *** Check for gethostbyname2_r ***
571         dnl **********************************
572         AC_MSG_CHECKING(for gethostbyname2_r)
573                 AC_TRY_LINK([#include <netdb.h>], [
574                 gethostbyname2_r(NULL,0,NULL,NULL,0,NULL,NULL);
575         ], [
576                 # Yes, we have it...
577                 AC_MSG_RESULT(yes)
578                 AC_DEFINE(HAVE_GETHOSTBYNAME2_R)
579         ], [
580                 AC_MSG_RESULT(no)
581         ])
583         dnl *****************************
584         dnl *** Checks for libnsl     ***
585         dnl *****************************
586         AC_CHECK_LIB(nsl, gethostbyaddr, LIBS="$LIBS -lnsl")
588         AC_CHECK_FUNCS(inet_pton inet_aton)
590         dnl ***********************************************
591         dnl *** Checks for size of sockaddr_un.sun_path ***
592         dnl ***********************************************
593         # AC_CHECK_SIZEOF can't cope with struct members :-(
594         AC_MSG_CHECKING(size of sockaddr_un.sun_path)
595         AC_CACHE_VAL(cv_mono_sizeof_sunpath,
596                 [AC_TRY_RUN([
597                         #include <sys/types.h>
598                         #include <stdio.h>
599                         #include <sys/un.h>
601                         int main(void) {
602                                 struct sockaddr_un sock_un;
603                                 FILE *f=fopen("conftestval", "w");
604                                 if(!f) exit(1);
605                                 fprintf(f, "%d\n", sizeof(sock_un.sun_path));
606                                 exit(0);
607                         }
608                 ], cv_mono_sizeof_sunpath=`cat conftestval`,
609                    cv_mono_sizeof_sunpath=0,
610                    cv_mono_sizeof_sunpath=0)])dnl
611         AC_MSG_RESULT($cv_mono_sizeof_sunpath)
612         AC_DEFINE_UNQUOTED(MONO_SIZEOF_SUNPATH, $cv_mono_sizeof_sunpath)
614         dnl *************************************
615         dnl *** Checks for zero length arrays ***
616         dnl *************************************
617         AC_MSG_CHECKING(whether $CC supports zero length arrays)
618         AC_TRY_COMPILE([
619                 struct s {
620                         int  length;
621                         char data [0];
622                 };
623         ], [], [
624                 AC_MSG_RESULT(yes)
625                 AC_DEFINE_UNQUOTED(MONO_ZERO_ARRAY_LENGTH, 0)
626         ], [
627                 AC_MSG_RESULT(no)
628                 AC_DEFINE_UNQUOTED(MONO_ZERO_ARRAY_LENGTH, 1)
629         ])
631         dnl *****************************
632         dnl *** Checks for libxnet    ***
633         dnl *****************************
634         case "${host}" in
635                 *solaris* )
636                         AC_MSG_CHECKING(for Solaris XPG4 support)
637                         if test -f /usr/lib/libxnet.so; then
638                                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
639                                 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
640                                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED=1"
641                                 LIBS="$LIBS -lxnet"
642                                 AC_MSG_RESULT(yes)
643                         else
644                                 AC_MSG_RESULT(no)
645                         fi
647                         if test "$GCC" = "yes"; then
648                                 CFLAGS="$CFLAGS -Wno-char-subscripts"
649                         fi
650                 ;;
651         esac
653         dnl *****************************
654         dnl *** Checks for libpthread ***
655         dnl *****************************
656         AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread")
657         AC_CHECK_HEADERS(pthread.h)
658         AC_CHECK_FUNCS(pthread_mutex_timedlock)
659         AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np)
660         AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
661         AC_TRY_COMPILE([ #include <pthread.h>], [
662                 pthread_mutexattr_t attr;
663                 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
664         ], [
665                 AC_MSG_RESULT(ok)
666         ], [
667                 AC_MSG_RESULT(no)
668                 AC_MSG_WARN(Using mono_mutex_t for recursive mutexes)
669                 AC_DEFINE(USE_MONO_MUTEX)
670         ])
671         AC_CHECK_FUNCS(pthread_attr_setstacksize)
673         dnl ***********************************
674         dnl *** Checks for working __thread ***
675         dnl ***********************************
676         AC_MSG_CHECKING(for working __thread)
677         if test "x$with_tls" != "x__thread"; then
678                 AC_MSG_RESULT(disabled)
679         else
680                 AC_TRY_RUN([
681                         #include <pthread.h>
683                         __thread int i;
684                         static int res1, res2;
686                         void thread_main (void *arg)
687                         {
688                                 i = arg;
689                                 sleep (1);
690                                 if (arg == 1)
691                                         res1 = (i == arg);
692                                 else
693                                         res2 = (i == arg);
694                         }
696                         int main () {
697                                 pthread_t t1, t2;
699                                 i = 5;
701                                 pthread_create (&t1, NULL, thread_main, 1);
702                                 pthread_create (&t2, NULL, thread_main, 2);
704                                 pthread_join (t1, NULL);
705                                 pthread_join (t2, NULL);
707                                 return !(res1 + res2 == 2);
708                         }
709                 ], [
710                                 AC_MSG_RESULT(yes)
711                                 AC_DEFINE(HAVE_KW_THREAD)
712                 ], [
713                                 AC_MSG_RESULT(no)
714                 ])
715         fi
717         dnl **************************************
718         dnl *** Checks for working sigaltstack ***
719         dnl **************************************
720         AC_MSG_CHECKING(for working sigaltstack)
721         if test "x$with_sigaltstack" != "xyes"; then
722                 AC_MSG_RESULT(disabled)
723         else
724                 AC_TRY_RUN([
725                         #include <stdio.h>
726                         #include <stdlib.h>
727                         #include <unistd.h>
728                         #include <signal.h>
729                         #include <pthread.h>
730                         #include <sys/wait.h>
732                         static void
733                         sigsegv_signal_handler (int _dummy, siginfo_t *info, void *context)
734                         {
735                                 exit (0);
736                         }
738                         static void *
739                         loop (void *ignored)
740                         {
741                                 char *ptr = NULL;
743                                 *ptr = 0;
744                                 return NULL;
745                         }
747                         static void
748                         child ()
749                         {
750                                 struct sigaction sa;
751                                 struct sigaltstack sas;
752                                 pthread_t id;
753                                 pthread_attr_t attr;
755                                 sa.sa_sigaction = sigsegv_signal_handler;
756                                 sigemptyset (&sa.sa_mask);
757                                 sa.sa_flags = SA_SIGINFO | SA_STACK;
758                                 if (sigaction (SIGSEGV, &sa, NULL) == -1) {
759                                         perror ("lala");
760                                         return;
761                                 }
763                                 sas.ss_sp = malloc (SIGSTKSZ);
764                                 sas.ss_size = SIGSTKSZ;
765                                 sas.ss_flags = SS_ONSTACK;
766                                 if (sigaltstack (&sas, NULL) == -1) {
767                                         perror ("lala");
768                                         return;
769                                 }
771                                 pthread_attr_init (&attr);
772                                 if (pthread_create(&id, &attr, loop, &attr) != 0) {
773                                         printf ("failed\n");
774                                         return;
775                                 }
777                                 sleep (100);
778                         }
780                         int
781                         main ()
782                         {
783                                 pid_t son;
784                                 int status;
785                                 int i;
787                                 son = fork ();
788                                 if (son == -1) {
789                                         return 1;
790                                 }
792                                 if (son == 0) {
793                                         child ();
794                                         return 0;
795                                 }
797                                 for (i = 0; i < 3; ++i) {
798                                         sleep (1);
799                                         waitpid (son, &status, WNOHANG);
800                                         if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
801                                                 return 0;
802                                 }
804                                 kill (son, SIGKILL);
805                                 return 1;
806                         }
808                 ], [
809                                 AC_MSG_RESULT(yes)
810                                 AC_DEFINE(HAVE_WORKING_SIGALTSTACK)
811                 ], [
812                                 with_sigaltstack=no
813                                 AC_MSG_RESULT(no)
814                 ])
815         fi
817         dnl ********************************
818         dnl *** Checks for semaphore lib ***
819         dnl ********************************
820         # 'Real Time' functions on Solaris
821         # posix4 on Solaris 2.6
822         # pthread (first!) on Linux
823         AC_SEARCH_LIBS(sem_init, pthread rt posix4) 
825         dnl ********************************
826         dnl *** Checks for timezone stuff **
827         dnl ********************************
828         AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
829                 AC_TRY_COMPILE([
830                         #include <time.h>
831                         ], [
832                         struct tm tm;
833                         tm.tm_gmtoff = 1;
834                         ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
835         if test $ac_cv_struct_tm_gmtoff = yes; then
836                 AC_DEFINE(HAVE_TM_GMTOFF)
837         else
838                 AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
839                         AC_TRY_COMPILE([
840                                 #include <time.h>
841                         ], [
842                                 timezone = 1;
843                         ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
844                 if test $ac_cv_var_timezone = yes; then
845                         AC_DEFINE(HAVE_TIMEZONE)
846                 else
847                         AC_ERROR(unable to find a way to determine timezone)
848                 fi
849         fi
851         dnl *********************************
852         dnl *** Checks for math functions ***
853         dnl *********************************
854         LIBS="$LIBS -lm";
855         AC_CHECK_FUNCS(finite, , AC_MSG_CHECKING(for finite in math.h)
856                 AC_TRY_LINK([#include <math.h>], 
857                 [ finite(0.0); ], 
858                 AC_DEFINE(HAVE_FINITE) AC_MSG_RESULT(yes),
859                 AC_MSG_RESULT(no)))
860         AC_CHECK_FUNCS(isfinite, , AC_MSG_CHECKING(for isfinite in math.h)
861                 AC_TRY_LINK([#include <math.h>], 
862                 [ isfinite(0.0); ], 
863                 AC_DEFINE(HAVE_ISFINITE) AC_MSG_RESULT(yes),
864                 AC_MSG_RESULT(no)))
866         dnl ****************************************************************
867         dnl *** Checks for working poll() (macosx defines it but doesn't ***
868         dnl *** have it in the library (duh))                            ***
869         dnl ****************************************************************
870         AC_CHECK_FUNCS(poll)
872         dnl *************************
873         dnl *** Check for signbit ***
874         dnl *************************
875         AC_MSG_CHECKING(for signbit)
876         AC_TRY_LINK([#include <math.h>], [
877                 int s = signbit(1.0);
878         ], [
879                 AC_MSG_RESULT(yes)
880                 AC_DEFINE(HAVE_SIGNBIT)
881         ], [
882                 AC_MSG_RESULT(no)
883         ]) 
885         dnl *********************
886         dnl *** Check for AIO ***
887         dnl *********************
888         AC_MSG_CHECKING([for SIGEV_THREAD definition])
889         dnl Some systems (FreeBSD at least) may have aio_read
890         dnl but don't support/define SIGEV_THREAD.
891         AC_TRY_COMPILE([
892         #include <sys/signal.h>
893         ],[
894         int x = SIGEV_THREAD;
895         ],[
896                 ac_cv_c_sigev_thread=yes
897                 AC_MSG_RESULT(yes)
898         ],[
899                 AC_MSG_RESULT(no)
900         ])
902         if test "$ac_cv_c_sigev_thread" = "yes" ; then
903                 AC_CHECK_HEADERS(aio.h sys/aio.h)
904                 AC_CHECK_LIB(rt, aio_read, [ LIBS="$LIBS -lrt" ],)
905                 SIGVAL_PTR="undefined"
906                 if test "$ac_cv_header_aio_h" = "yes" -o "$ac_cv_header_sys_aio_h" = "yes" ; then
907                         AC_CHECK_MEMBER(union sigval.sigval_ptr,SIGVAL_PTR="sigval_ptr",, [
908                                         #include <sys/signal.h>
909                                         ])
910                         AC_CHECK_MEMBER(union sigval.sival_ptr,SIGVAL_PTR="sival_ptr",, [
911                                         #include <sys/signal.h>
912                                         ])
913                         if test "$SIGVAL_PTR" = "undefined" ; then
914                                 AC_MSG_ERROR([Unable to detect field name in 'union sigval'])
915                         fi
916                 fi
917                 AC_DEFINE_UNQUOTED(SIGVAL_PTR,$SIGVAL_PTR,[Pointer field name in 'union sigval'])
918         fi
919 else
920         jdk_headers_found=no
921         AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
922         AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?))
924         dnl *********************************
925         dnl *** Check for struct ip_mreqn ***
926         dnl *********************************
927         AC_MSG_CHECKING(for struct ip_mreqn)
928         AC_TRY_COMPILE([#include <ws2tcpip.h>], [
929                 struct ip_mreqn mreq;
930                 mreq.imr_address.s_addr = 0;
931         ], [
932                 # Yes, we have it...
933                 AC_MSG_RESULT(yes)
934                 AC_DEFINE(HAVE_STRUCT_IP_MREQN)
935         ], [
936                 # We'll just have to try and use struct ip_mreq
937                 AC_MSG_RESULT(no)
938                 AC_MSG_CHECKING(for struct ip_mreq)
939                 AC_TRY_COMPILE([#include <ws2tcpip.h>], [
940                         struct ip_mreq mreq;
941                         mreq.imr_interface.s_addr = 0;
942                 ], [
943                         # Yes, we have it...
944                         AC_MSG_RESULT(yes)
945                         AC_DEFINE(HAVE_STRUCT_IP_MREQ)
946                 ], [
947                         # No multicast support
948                         AC_MSG_RESULT(no)
949                 ])
950         ])
953 dnl socklen_t check
954 AC_MSG_CHECKING(for socklen_t)
955 AC_TRY_COMPILE([
956 #include <sys/types.h>
957 #include <sys/socket.h>
959   socklen_t foo;
961 ac_cv_c_socklen_t=yes
962         AC_DEFINE(HAVE_SOCKLEN_T)
963         AC_MSG_RESULT(yes)
965         AC_MSG_RESULT(no)
968 AC_CHECK_FUNCS(trunc, , AC_MSG_CHECKING(for trunc in math.h)
969         # Simply calling trunc (0.0) is no good since gcc will optimize the call away
970         AC_TRY_LINK([#include <math.h>], 
971         [ static void *p = &trunc; ],
972         [
973                 AC_DEFINE(HAVE_TRUNC) 
974                 AC_MSG_RESULT(yes)
975                 ac_cv_trunc=yes
976         ],
977         AC_MSG_RESULT(no)))
979 if test "x$ac_cv_truncl" != "xyes"; then
980    AC_CHECK_LIB(sunmath, aintl, [ AC_DEFINE(HAVE_AINTL) LIBS="$LIBS -lsunmath"])
983 dnl ****************************
984 dnl *** Look for /dev/random ***
985 dnl ****************************
987 AC_MSG_CHECKING([if usage of random device is requested])
988 AC_ARG_ENABLE(dev-random,
989 [  --disable-dev-random    disable the use of the random device],
990 try_dev_random=$enableval, try_dev_random=yes)
991 AC_MSG_RESULT($try_dev_random)
993 case "{$target}" in
994     *-openbsd*)
995     NAME_DEV_RANDOM="/dev/srandom"
996     ;;
998 dnl Win32 does not have /dev/random, they have their own method...
1000     *-*-mingw*|*-*-cygwin*)
1001     ac_cv_have_dev_random=no
1002     ;;
1004 dnl Everywhere else, it's /dev/random
1006     *)
1007     NAME_DEV_RANDOM="/dev/random"
1008     ;;
1009 esac
1011 AC_DEFINE_UNQUOTED(NAME_DEV_RANDOM, "$NAME_DEV_RANDOM")
1013 dnl Now check if the device actually exists
1015 if test "x$try_dev_random" = "xyes"; then
1016     AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
1017     [if test -r "$NAME_DEV_RANDOM" ; then
1018         ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
1019     if test "x$ac_cv_have_dev_random" = "xyes"; then
1020         AC_DEFINE(HAVE_CRYPT_RNG)
1021     fi
1022 else
1023     AC_MSG_CHECKING(for random device)
1024     ac_cv_have_dev_random=no
1025     AC_MSG_RESULT(has been disabled)
1028 if test "x$platform_win32" = "xyes"; then
1029     AC_DEFINE(HAVE_CRYPT_RNG)
1032 if test "x$ac_cv_have_dev_random" = "xno" \
1033     && test "x$platform_win32" = "xno"; then
1034     AC_MSG_WARN([[
1036 *** A system-provided entropy source was not found on this system.
1037 *** Because of this, the System.Security.Cryptography random number generator
1038 *** will throw a NotImplemented exception.
1040 *** If you are seeing this message, and you know your system DOES have an
1041 *** entropy collection in place, please contact <crichton@gimp.org> and
1042 *** provide information about the system and how to access the random device.
1044 *** Otherwise you can install either egd or prngd and set the environment
1045 *** variable MONO_EGD_SOCKET to point to the daemon's socket to use that.
1046 ***]])
1049 AC_MSG_CHECKING([if inter-process shared handles are requested])
1050 AC_ARG_ENABLE(shared-handles, [  --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=yes)
1051 AC_MSG_RESULT($try_shared_handles)
1052 if test "x$try_shared_handles" != "xyes"; then
1053         AC_DEFINE(DISABLE_SHARED_HANDLES)
1054         AC_SUBST(DISABLE_SHARED_HANDLES)
1058 # ICU 
1060 ICU_CFLAGS=""
1061 ICU_LIBS=""
1062 enable_icu=no
1064 probe_icu=true
1065 AC_ARG_WITH(icu, [  --with-icu=yes/no],
1066         if test x$with_icu = xno; then
1067            probe_icu=false;
1068            AC_MSG_RESULT(Will not probe for ICU)
1069         fi
1072 if $probe_icu; then
1073         AC_PATH_PROG(ICU_CONFIG, icu-config, no)
1074         if test "x$ICU_CONFIG" = "xno" -o ! -x "$ICU_CONFIG"; then
1075                 AC_MSG_WARN([Only invariant locale available; install ICU for I18N support])
1076                 enable_icu="no, if you want full i18n support download it from: http://oss.software.ibm.com/icu/index.html"
1077         else
1078                 enable_icu="yes. Version: `$ICU_CONFIG --version`"
1079                 AC_DEFINE(HAVE_ICU)
1080                 ICU_CFLAGS=`$ICU_CONFIG --cppflags`
1081                 ICU_LIBS=`$ICU_CONFIG --ldflags`
1082         fi
1084 AC_SUBST(ICU_CFLAGS)
1085 AC_SUBST(ICU_LIBS)
1087 TARGET="unknown"
1088 ACCESS_UNALIGNED="yes"
1090 JIT_SUPPORTED=no
1091 LIBC="libc.so.6"
1092 INTL="libc.so.6"
1094 jit_wanted=false
1095 case "$host" in
1096 #       mips-sgi-irix5.* | mips-sgi-irix6.*)
1097 #               TARGET=MIPS;
1098 #               ACCESS_UNALIGNED="no"
1099 #               ;;
1100         i*86-*-*)
1101                 TARGET=X86;
1102                 arch_target=x86;
1103                 JIT_SUPPORTED=yes
1104                 jit_wanted=true
1105                 ;;
1106         x86_64-*-* | amd64-*-*)
1107                 TARGET=AMD64;
1108                 arch_target=amd64;
1109                 JIT_SUPPORTED=no
1110                 ;;
1111         sparc*-*-*)
1112                 if test "x$ac_cv_sizeof_void_p" = "x8"; then
1113                    TARGET=SPARC64
1114                 else
1115                         TARGET=SPARC
1116                 fi
1117                 arch_target=sparc;
1118                 JIT_SUPPORTED=yes
1119                 ACCESS_UNALIGNED="no"
1120                 LIBC="libc.so"
1121                 INTL="libintl.so"
1122                 jit_wanted=true
1123                 ;;
1124        alpha*-*-linux* | alpha*-*-osf*)
1125                 TARGET=ALPHA;
1126                 ACCESS_UNALIGNED="no"
1127                 JIT_SUPPORTED=no
1128                 arch_target=alpha;
1129                ;;
1130 #       ia64-*-linux* | ia64-*-hpux*)
1131 #               TARGET=IA64;
1132 #               arch_target=ia64;
1133 #               JIT_SUPPORTED=no;
1134 #               ACCESS_UNALIGNED="no";
1135 #               case "$host_os" in
1136 #                       linux*) LIBC="libc.so.6.1";;
1137 #                       hpux*)  LIBC="libc.so.1";;
1138 #               esac
1139 #               ;;
1140 #       m68k-*-linux*)
1141 #               TARGET=M68K
1142 #               ;;
1143         hppa2.0w-hp-hpux11.00 | hppa64-hp-hpux11.00)
1144                 TARGET=HPPA;
1145                 arch_target=hppa; 
1146                 LIBC="libc.sl"
1147                 ACCESS_UNALIGNED="no"
1148                 ;;
1149         hppa*linux*)
1150                 TARGET=HPPA;
1151                 arch_target=hppa; 
1152                 ACCESS_UNALIGNED="no"
1153                 ;;
1154         macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | \
1155         powerpc-*-sysv* | powerpc-*-darwin*)
1156                 TARGET=POWERPC;
1157                 arch_target=ppc;
1158                 JIT_SUPPORTED=yes
1159                 jit_wanted=true
1160                 ;;
1161         arm-*-linux-* | armv4l-*-linux-*)
1162                 TARGET=ARM;
1163                 arch_target=arm;
1164                 ACCESS_UNALIGNED="no"
1165                 ;;
1166         s390-*-linux*)
1167                 TARGET=S390;
1168                 arch_target=s390;
1169                 ACCESS_UNALIGNED="no"
1170                 JIT_SUPPORTED=yes
1171                 ;;
1172 esac
1174 AC_ARG_WITH(jit, [  --with-jit=yes,no       If you want to build scripts that default to the JIT],[
1175         jit_wanted=true
1178 USEJIT=false
1179 if test x$JIT_SUPPORTED = xyes; then
1180    if $jit_wanted; then
1181       USEJIT=true
1182       jit_status="Building and using the JIT"
1183    else
1184       jit_status="Building the JIT, defaulting to the interpreter"
1185    fi
1186 else
1187    jit_status="interpreter"
1190 AM_CONDITIONAL(USE_JIT, test x$USEJIT = xtrue)
1192 libsuffix=".so"
1194 case "$host" in
1195      powerpc-*-darwin*)
1196         libsuffix=".dylib"
1197         LIBC="libc.dylib"
1198         INTL="libintl.dylib"
1199         ;;
1200      *-*-*netbsd*)
1201         LIBC="libc.so.12"
1202         INTL="libintl.so.0"
1203         ;;
1204 esac
1205 AC_SUBST(libsuffix)
1207 if test ${TARGET} = ARM; then
1208         dnl ******************************************
1209         dnl *** Check to see what FPU is available ***
1210         dnl ******************************************
1211         AC_MSG_CHECKING(which FPU to use)
1213         AC_TRY_COMPILE([], [
1214                 __asm__ ("ldfd f0, [r0]");
1215                 ], fpu=FPA, [
1216                         AC_TRY_COMPILE([], [
1217                                 __asm__ ("fldd d0, [r0]");
1218                         ], fpu=VFP, fpu=NONE)
1219                 ])
1221         AC_MSG_RESULT($fpu)
1222         CPPFLAGS="$CPPFLAGS -DARM_FPU_$fpu"
1223         unset fpu
1226 if test ${TARGET} = unknown; then
1227         CPPFLAGS="$CPPFLAGS -DNO_PORT"
1228         AC_MSG_WARN("mono has not been ported to $host: some things may not work.")
1231 if test ${ACCESS_UNALIGNED} = no; then
1232         CPPFLAGS="$CPPFLAGS -DNO_UNALIGNED_ACCESS"
1235 PREVIEW=no
1236 AC_ARG_WITH(preview, [ --with-preview=yes,no     If you want to install the 2.0 FX preview],[
1237         if test x$with_preview = xyes; then
1238               PREVIEW=yes
1239         fi
1242 AM_CONDITIONAL(INSTALL_2_0, test x$PREVIEW = xyes)
1244 AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
1245 AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
1246 AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
1247 AM_CONDITIONAL(SPARC64, test x$TARGET = xSPARC64)
1248 AM_CONDITIONAL(X86, test x$TARGET = xX86)
1249 AM_CONDITIONAL(AMD64, test x$TARGET = xAMD64)
1250 AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
1251 AM_CONDITIONAL(IA64, test x$TARGET = xIA64)
1252 AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
1253 AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
1254 AM_CONDITIONAL(ARM, test x$TARGET = xARM)
1255 AM_CONDITIONAL(S390, test x$TARGET = xS390)
1256 AM_CONDITIONAL(HPPA, test x$TARGET = xHPPA)
1258 AM_CONDITIONAL(JIT_SUPPORTED, test x$JIT_SUPPORTED = xyes)
1260 AC_SUBST(LIBC)
1261 AC_SUBST(INTL)
1263 AC_SUBST(arch_target)
1264 AC_SUBST(CFLAGS)
1265 AC_SUBST(CPPFLAGS)
1266 AC_SUBST(LDFLAGS)
1268 AC_OUTPUT([
1269 Makefile
1270 mint.pc
1271 mono.pc
1272 mono/Makefile
1273 mono/utils/Makefile
1274 mono/metadata/Makefile
1275 mono/dis/Makefile
1276 mono/cil/Makefile
1277 mono/arch/Makefile
1278 mono/os/Makefile
1279 mono/os/win32/Makefile
1280 mono/os/unix/Makefile
1281 mono/arch/x86/Makefile
1282 mono/arch/amd64/Makefile
1283 mono/arch/hppa/Makefile
1284 mono/arch/ppc/Makefile
1285 mono/arch/sparc/Makefile
1286 mono/arch/s390/Makefile
1287 mono/arch/arm/Makefile
1288 mono/arch/alpha/Makefile
1289 mono/interpreter/Makefile
1290 mono/tests/Makefile
1291 mono/tests/tests-config
1292 mono/benchmark/Makefile
1293 mono/monoburg/Makefile
1294 mono/monograph/Makefile
1295 mono/io-layer/Makefile
1296 mono/handles/Makefile
1297 mono/mini/Makefile
1298 mono/profiler/Makefile
1299 ikvm-jni/Makefile
1300 runtime/Makefile
1301 runtime/net_1_1/Makefile
1302 runtime/net_2_0/Makefile
1303 scripts/Makefile
1304 man/Makefile
1305 web/Makefile
1306 docs/Makefile
1307 data/Makefile
1308 samples/Makefile
1309 support/Makefile
1310 data/config
1311 mono.spec
1312 tools/Makefile
1313 tools/locale-builder/Makefile
1316 echo "
1318         GC:          $gc
1319         ICU:         $enable_icu
1320         TLS:         $with_tls
1321         SIGALTSTACK: $with_sigaltstack
1322         Engine:      $jit_status
1323         2.0 Alpha:   $PREVIEW
1324         JNI support: $jdk_headers_found