3 AM_CONFIG_HEADER(config.h)
4 AM_INIT_AUTOMAKE(mono,0.92)
15 if test -d $srcdir/libgc ; then
22 # These are the flags that need to be stored in the mono.pc file for
23 # compiling code that will embed Mono
27 AC_SUBST(libmono_cflags)
28 AC_SUBST(libmono_ldflags)
30 dnl if linker handles the version script
33 # Set to yes if Unix sockets cannot be created in an anonymous namespace
36 # Thread configuration inspired by sleepycat's db
37 AC_MSG_CHECKING([host platform characteristics])
40 *-*-mingw*|*-*-cygwin*)
42 AC_DEFINE(PLATFORM_WIN32,1,[Platform is Win32])
45 # latest libgc already defines GC_WIN32_THREADS
46 # CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS -DWIN32_THREADS"
47 CPPFLAGS="$CPPFLAGS -DWIN32_THREADS"
54 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
55 libmono_cflags="-D_REENTRANT"
56 LDFLAGS="$LDFLAGS -pthread"
57 libmono_ldflags="-pthread"
62 *-*-*freebsd*|*-*-*openbsd*)
64 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
65 libmono_cflags="-D_THREAD_SAFE"
66 LDFLAGS="$LDFLAGS -pthread"
67 libmono_ldflags="-pthread"
69 AC_DEFINE(PTHREAD_POINTER_ID)
71 libgc_threads=pthreads
75 CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT"
76 libmono_cflags="-D_REENTRANT"
77 libmono_ldflags="-lpthread"
79 libgc_threads=pthreads
83 CPPFLAGS="$CPPFLAGS -DGC_HPUX_THREADS -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_REENTRANT"
84 CFLAGS="$CFLAGS +ESdbgasm"
86 libmono_cflags="-D_REENTRANT"
87 libmono_ldflags="-lpthread"
88 libgc_threads=pthreads
93 CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT"
95 libmono_cflags="-D_REENTRANT"
96 libgc_threads=pthreads
100 CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE -DGC_MACOSX_THREADS"
101 libmono_cflags="-D_THREAD_SAFE"
102 LDFLAGS="$LDFLAGS -pthread"
103 libmono_ldflags="-pthread"
105 AC_DEFINE(PTHREAD_POINTER_ID)
106 AC_DEFINE(USE_MACH_SEMA)
107 no_version_script=yes
109 libgc_threads=pthreads
112 AC_MSG_WARN([*** Please add $host to configure.in checks!])
119 if test x$need_link_unlink = xyes; then
120 AC_DEFINE(NEED_LINK_UNLINK, 1, [Define if Unix sockets cannot be created in an anonymous namespace])
123 AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
125 AC_CHECK_TOOL(CC, gcc, gcc)
129 dnl We should use AM_PROG_AS, but it's not available on automake/aclocal 1.4
131 # Set ASFLAGS if not already set.
132 : ${CCASFLAGS='$(CFLAGS)'}
136 AC_CHECK_PROG(BISON, bison,yes,no)
137 if test "x$BISON" = "xno";
139 AC_MSG_ERROR([You need to install bison])
142 dnl may require a specific autoconf version
143 dnl AC_PROG_CC_FOR_BUILD
144 dnl CC_FOR_BUILD not automatically detected
147 if test "x$cross_compiling" = "xyes"; then
151 AC_SUBST(CC_FOR_BUILD)
153 AC_SUBST(BUILD_EXEEXT)
160 # Test whenever ld supports -version-script
163 if test "x$lt_cv_prog_gnu_ld" = "xno"; then
164 no_version_script=yes
167 AM_CONDITIONAL(NO_VERSION_SCRIPT, test x$no_version_script = xyes)
169 AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h sys/un.h)
171 # for mono/mini/tramp-x86.c
172 AC_CHECK_HEADERS(valgrind/memcheck.h)
174 # for mono/metadata/debug-symfile.c
175 AC_CHECK_HEADERS(elf.h)
178 AC_CHECK_HEADERS(wchar.h)
180 # not 64 bit clean in cross-compile
181 AC_CHECK_SIZEOF(void *, 4)
184 if test x"$GCC" = xyes; then
185 WARN='-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
186 # The runtime code does not respect ANSI C strict aliasing rules
187 CFLAGS="$CFLAGS -fno-strict-aliasing"
189 # The Sun Forte compiler complains about inline functions that access static variables
190 # so disable all inlining.
193 CFLAGS="$CFLAGS -Dinline="
197 CFLAGS="$CFLAGS -g $WARN"
199 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
200 if test "x$PKG_CONFIG" = "xno"; then
201 AC_MSG_ERROR([You need to install pkg-config])
204 dnl for use on the build system
205 dnl pkg-config is stupid
206 BUILD_GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
207 BUILD_GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
208 AC_SUBST(BUILD_GLIB_CFLAGS)
209 AC_SUBST(BUILD_GLIB_LIBS)
212 AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir],
213 if test x$with_crosspkgdir = "x"; then
214 if test -s $PKG_CONFIG_PATH; then
215 PKG_PATH=$PKG_CONFIG_PATH
218 PKG_PATH=$with_crosspkgdir
219 PKG_CONFIG_PATH=$PKG_PATH
220 export PKG_CONFIG_PATH
224 ## Versions of dependencies
225 GLIB_REQUIRED_VERSION=1.3.11
227 PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)
229 GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
230 GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
231 GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
232 GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
234 AC_SUBST(GLIB_CFLAGS)
236 AC_SUBST(GMODULE_CFLAGS)
237 AC_SUBST(GMODULE_LIBS)
239 AC_ARG_WITH(gc, [ --with-gc=boehm,included,none],[gc=$with_gc],[gc=$gc_default])
241 # Enable support for NPTL only features like fast thread-local storage
242 # We can't reliably detect nptl at compile & run time
243 # so this option will stay until nptl becomes more widespread
244 AC_ARG_WITH(nptl, [ --with-nptl=yes,no enable/disable support for NPTL],[],[with_nptl=yes])
246 # Enable support for using sigaltstack for SIGSEGV and stack overflow handling
247 # This does not work on some platforms (bug #55253)
248 AC_ARG_WITH(sigaltstack, [ --with-sigaltstack=yes,no enable/disable support for sigaltstack],[],[with_sigaltstack=yes])
250 # assembly bundle support, see metadata/make-bundle.pl for more info
251 AC_ARG_WITH(bundle, [ --with-bundle=bundle_template],[
252 BUNDLE_FILE=$with_bundle
253 AC_SUBST(BUNDLE_FILE)
254 AC_DEFINE(WITH_BUNDLE)
256 AM_CONDITIONAL(WITH_BUNDLE, test x$with_bundle != xno)
263 AC_CHECK_HEADERS(gc.h gc/gc.h, gc_headers=yes)
264 AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes",,$libdl)
266 if test "x$found_boehm" != "xyes"; then
267 AC_MSG_ERROR("GC requested but libgc not found! Install libgc or run configure with --with-gc=none.")
269 if test "x$gc_headers" != "xyes"; then
270 AC_MSG_ERROR("GC requested but header files not found! You may need to install them by hand.")
273 AC_DEFINE(HAVE_BOEHM_GC)
274 AC_SUBST(HAVE_BOEHM_GC)
275 LIBGC_LIBS="-lgc $libdl"
277 # AC_CHECK_FUNCS does not work for some reason...
278 AC_CHECK_LIB(gc, GC_gcj_malloc, found_gcj_malloc="yes",,$libdl)
279 if test "x$found_gcj_malloc" = "xyes"; then
280 AC_DEFINE(HAVE_GC_GCJ_MALLOC)
282 AC_CHECK_LIB(gc, GC_enable, found_gc_enable="yes",,$libdl)
283 if test "x$found_gc_enable" = "xyes"; then
284 AC_DEFINE(HAVE_GC_ENABLE)
289 AC_CONFIG_SUBDIRS(libgc)
296 LIBGC_CFLAGS='-I$(top_srcdir)/libgc/include'
297 LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la'
299 AC_DEFINE(HAVE_BOEHM_GC)
300 AC_SUBST(HAVE_BOEHM_GC)
303 AC_DEFINE(USE_INCLUDED_LIBGC)
305 # The included libgc contains GCJ support
306 AC_DEFINE(HAVE_GC_GCJ_MALLOC)
307 AC_DEFINE(HAVE_GC_ENABLE)
311 AC_MSG_WARN("Compiling mono without GC.")
314 AC_MSG_ERROR([Invalid argument to --with-gc.])
319 # tell libgc/configure about what we want
320 ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads"
322 AM_CONDITIONAL(INCLUDED_LIBGC, test x$use_included_gc = xyes)
323 AC_SUBST(LIBGC_CFLAGS)
328 dnl End of libgc checks
331 if test x$platform_win32 = xno; then
333 dnl ******************************************************************
334 dnl *** Checks for the IKVM JNI interface library ***
335 dnl ******************************************************************
336 AC_ARG_WITH(ikvm-jni, [ --with-ikvm-jni=yes,no build the IKVM JNI interface library],[with_ikvm_jni=$withval],[with_ikvm_jni=yes])
337 AC_ARG_WITH(jdk, [ --with-jdk=DIRECTORY Use JDK from DIRECTORY],[with_jdk_dir=$withval],[with_jdk_dir=])
340 if test x$with_ikvm_jni = xyes; then
341 AC_MSG_CHECKING([JDK headers])
343 if test x$with_jdk_dir = x; then
344 # Try JAVA_HOME variable
345 if test x$JAVA_HOME != x; then
346 with_jdk_dir=$JAVA_HOME
351 if test -d $with_jdk_dir/include; then
352 jdk_headers_found=yes
354 if test -d $with_jdk_dir/include/linux; then
357 if test -d $with_jdk_dir/include/solaris; then
360 if test -f $with_jdk_dir/include/jni_md.h; then
361 # GNU Classpath sources
372 if test x$jdk_headers_found = xyes; then
373 AC_MSG_RESULT($with_jdk_dir/include $with_jdk_dir/include/$jdk_platform)
375 AC_MSG_RESULT(not found)
378 if test x$jdk_headers_found = xyes; then
379 ikvm_jni_dir=ikvm-jni
380 IKVM_JNI_CFLAGS="-I$with_jdk_dir/include -I$with_jdk_dir/include/$jdk_platform"
384 AC_SUBST(ikvm_jni_dir)
385 AC_SUBST(IKVM_JNI_CFLAGS)
387 AC_CHECK_FUNCS(getgrgid_r)
388 AC_CHECK_FUNCS(getgrnam_r)
389 AC_CHECK_FUNCS(getpwnam_r)
390 AC_CHECK_FUNCS(getpwuid_r)
391 AC_CHECK_FUNCS(getresuid)
392 AC_CHECK_FUNCS(setresuid)
394 dnl ******************************************************************
395 dnl *** Check for large file support ***
396 dnl *** (If we were using autoconf 2.50 we'd use AC_SYS_LARGEFILE) ***
397 dnl ******************************************************************
399 # Check that off_t can represent 2**63 - 1 correctly, working around
400 # potential compiler bugs. Defines LARGE_FILE_SUPPORT, adds $1 to
401 # CPPFLAGS and sets $large_offt to yes if the test succeeds
403 AC_DEFUN(LARGE_FILES, [
404 large_CPPFLAGS=$CPPFLAGS
405 CPPFLAGS="$CPPFLAGS $1"
407 #include <sys/types.h>
409 #define BIG_OFF_T (((off_t)1<<62)-1+((off_t)1<<62))
412 int big_off_t=((BIG_OFF_T%2147483629==721) &&
413 (BIG_OFF_T%2147483647==1));
422 AC_DEFINE(HAVE_LARGE_FILE_SUPPORT)
423 large_CPPFLAGS="$large_CPPFLAGS $1"
428 CPPFLAGS=$large_CPPFLAGS
431 AC_MSG_CHECKING(if off_t is 64 bits wide)
433 if test $large_offt = no; then
434 AC_MSG_CHECKING(if _FILE_OFFSET_BITS=64 gives 64 bit off_t)
435 LARGE_FILES("-D_FILE_OFFSET_BITS=64")
437 if test $large_offt = no; then
438 AC_MSG_WARN([No 64 bit file size support available])
441 dnl *****************************
442 dnl *** Checks for libsocket ***
443 dnl *****************************
444 AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
446 dnl *******************************
447 dnl *** Checks for MSG_NOSIGNAL ***
448 dnl *******************************
449 AC_MSG_CHECKING(for MSG_NOSIGNAL)
450 AC_TRY_COMPILE([#include <sys/socket.h>], [
451 int f = MSG_NOSIGNAL;
455 AC_DEFINE(HAVE_MSG_NOSIGNAL)
457 # We'll have to use signals
461 dnl *****************************
462 dnl *** Checks for SOL_IP ***
463 dnl *****************************
464 AC_MSG_CHECKING(for SOL_IP)
465 AC_TRY_COMPILE([#include <netdb.h>], [
470 AC_DEFINE(HAVE_SOL_IP)
472 # We'll have to use getprotobyname
476 dnl *****************************
477 dnl *** Checks for SOL_IPV6 ***
478 dnl *****************************
479 AC_MSG_CHECKING(for SOL_IPV6)
480 AC_TRY_COMPILE([#include <netdb.h>], [
481 int level = SOL_IPV6;
485 AC_DEFINE(HAVE_SOL_IPV6)
487 # We'll have to use getprotobyname
491 dnl *****************************
492 dnl *** Checks for SOL_TCP ***
493 dnl *****************************
494 AC_MSG_CHECKING(for SOL_TCP)
495 AC_TRY_COMPILE([#include <netdb.h>], [
500 AC_DEFINE(HAVE_SOL_TCP)
502 # We'll have to use getprotobyname
506 dnl *****************************
507 dnl *** Checks for IP_PKTINFO ***
508 dnl *****************************
509 AC_MSG_CHECKING(for IP_PKTINFO)
510 AC_TRY_COMPILE([#include <netdb.h>], [
511 int level = IP_PKTINFO;
515 AC_DEFINE(HAVE_IP_PKTINFO)
520 dnl *********************************
521 dnl *** Check for struct ip_mreqn ***
522 dnl *********************************
523 AC_MSG_CHECKING(for struct ip_mreqn)
524 AC_TRY_COMPILE([#include <netinet/in.h>], [
525 struct ip_mreqn mreq;
526 mreq.imr_address.s_addr = 0;
530 AC_DEFINE(HAVE_STRUCT_IP_MREQN)
532 # We'll just have to try and use struct ip_mreq
534 AC_MSG_CHECKING(for struct ip_mreq)
535 AC_TRY_COMPILE([#include <netinet/in.h>], [
537 mreq.imr_interface.s_addr = 0;
541 AC_DEFINE(HAVE_STRUCT_IP_MREQ)
543 # No multicast support
548 dnl **********************************
549 dnl *** Check for gethostbyname2_r ***
550 dnl **********************************
551 AC_MSG_CHECKING(for gethostbyname2_r)
552 AC_TRY_LINK([#include <netdb.h>], [
553 gethostbyname2_r(NULL,0,NULL,NULL,0,NULL,NULL);
557 AC_DEFINE(HAVE_GETHOSTBYNAME2_R)
562 dnl *****************************
563 dnl *** Checks for libnsl ***
564 dnl *****************************
565 AC_CHECK_LIB(nsl, gethostbyaddr, LIBS="$LIBS -lnsl")
567 AC_CHECK_FUNCS(inet_pton inet_aton)
569 dnl ***********************************************
570 dnl *** Checks for size of sockaddr_un.sun_path ***
571 dnl ***********************************************
572 # AC_CHECK_SIZEOF can't cope with struct members :-(
573 AC_MSG_CHECKING(size of sockaddr_un.sun_path)
574 AC_CACHE_VAL(cv_mono_sizeof_sunpath,
576 #include <sys/types.h>
581 struct sockaddr_un sock_un;
582 FILE *f=fopen("conftestval", "w");
584 fprintf(f, "%d\n", sizeof(sock_un.sun_path));
587 ], cv_mono_sizeof_sunpath=`cat conftestval`,
588 cv_mono_sizeof_sunpath=0,
589 cv_mono_sizeof_sunpath=0)])dnl
590 AC_MSG_RESULT($cv_mono_sizeof_sunpath)
591 AC_DEFINE_UNQUOTED(MONO_SIZEOF_SUNPATH, $cv_mono_sizeof_sunpath)
593 dnl *************************************
594 dnl *** Checks for zero length arrays ***
595 dnl *************************************
596 AC_MSG_CHECKING(whether $CC supports zero length arrays)
604 AC_DEFINE_UNQUOTED(MONO_ZERO_ARRAY_LENGTH, 0)
607 AC_DEFINE_UNQUOTED(MONO_ZERO_ARRAY_LENGTH, 1)
610 dnl *****************************
611 dnl *** Checks for libxnet ***
612 dnl *****************************
615 AC_MSG_CHECKING(for Solaris XPG4 support)
616 if test -f /usr/lib/libxnet.so; then
617 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
618 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
619 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED=1"
626 if test "$GCC" = "yes"; then
627 CFLAGS="$CFLAGS -Wno-char-subscripts"
632 dnl *****************************
633 dnl *** Checks for libpthread ***
634 dnl *****************************
635 AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread")
636 AC_CHECK_HEADERS(pthread.h)
637 AC_CHECK_FUNCS(pthread_mutex_timedlock)
638 AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np)
639 AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
640 AC_TRY_COMPILE([ #include <pthread.h>], [
641 pthread_mutexattr_t attr;
642 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
647 AC_MSG_WARN(Using mono_mutex_t for recursive mutexes)
648 AC_DEFINE(USE_MONO_MUTEX)
650 AC_CHECK_FUNCS(pthread_attr_setstacksize)
652 dnl ***********************************
653 dnl *** Checks for working __thread ***
654 dnl ***********************************
655 AC_MSG_CHECKING(for working __thread)
656 if test "x$with_nptl" != "xyes"; then
657 AC_MSG_RESULT(disabled)
663 static int res1, res2;
665 void thread_main (void *arg)
680 pthread_create (&t1, NULL, thread_main, 1);
681 pthread_create (&t2, NULL, thread_main, 2);
683 pthread_join (t1, NULL);
684 pthread_join (t2, NULL);
686 return !(res1 + res2 == 2);
690 AC_DEFINE(HAVE_KW_THREAD)
696 dnl **************************************
697 dnl *** Checks for working sigaltstack ***
698 dnl **************************************
699 AC_MSG_CHECKING(for working sigaltstack)
700 if test "x$with_sigaltstack" != "xyes"; then
701 AC_MSG_RESULT(disabled)
709 #include <sys/wait.h>
712 sigsegv_signal_handler (int _dummy, siginfo_t *info, void *context)
730 struct sigaltstack sas;
734 sa.sa_sigaction = sigsegv_signal_handler;
735 sigemptyset (&sa.sa_mask);
736 sa.sa_flags = SA_SIGINFO | SA_STACK;
737 if (sigaction (SIGSEGV, &sa, NULL) == -1) {
742 sas.ss_sp = malloc (SIGSTKSZ);
743 sas.ss_size = SIGSTKSZ;
744 sas.ss_flags = SS_ONSTACK;
745 if (sigaltstack (&sas, NULL) == -1) {
750 pthread_attr_init (&attr);
751 if (pthread_create(&id, &attr, loop, &attr) != 0) {
776 for (i = 0; i < 3; ++i) {
778 waitpid (son, &status, WNOHANG);
779 if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
789 AC_DEFINE(HAVE_WORKING_SIGALTSTACK)
796 dnl ********************************
797 dnl *** Checks for semaphore lib ***
798 dnl ********************************
799 # 'Real Time' functions on Solaris
800 # posix4 on Solaris 2.6
801 # pthread (first!) on Linux
802 AC_SEARCH_LIBS(sem_init, pthread rt posix4)
804 dnl ********************************
805 dnl *** Checks for timezone stuff **
806 dnl ********************************
807 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
813 ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
814 if test $ac_cv_struct_tm_gmtoff = yes; then
815 AC_DEFINE(HAVE_TM_GMTOFF)
817 AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
822 ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
823 if test $ac_cv_var_timezone = yes; then
824 AC_DEFINE(HAVE_TIMEZONE)
826 AC_ERROR(unable to find a way to determine timezone)
830 dnl *********************************
831 dnl *** Checks for math functions ***
832 dnl *********************************
834 AC_CHECK_FUNCS(finite, , AC_MSG_CHECKING(for finite in math.h)
835 AC_TRY_LINK([#include <math.h>],
837 AC_DEFINE(HAVE_FINITE) AC_MSG_RESULT(yes),
839 AC_CHECK_FUNCS(isfinite, , AC_MSG_CHECKING(for isfinite in math.h)
840 AC_TRY_LINK([#include <math.h>],
842 AC_DEFINE(HAVE_ISFINITE) AC_MSG_RESULT(yes),
845 dnl ****************************************************************
846 dnl *** Checks for working poll() (macosx defines it but doesn't ***
847 dnl *** have it in the library (duh)) ***
848 dnl ****************************************************************
851 dnl *************************
852 dnl *** Check for signbit ***
853 dnl *************************
854 AC_MSG_CHECKING(for signbit)
855 AC_TRY_LINK([#include <math.h>], [
856 int s = signbit(1.0);
859 AC_DEFINE(HAVE_SIGNBIT)
864 dnl *********************
865 dnl *** Check for AIO ***
866 dnl *********************
867 AC_MSG_CHECKING([for SIGEV_THREAD definition])
868 dnl Some systems (FreeBSD at least) may have aio_read
869 dnl but don't support/define SIGEV_THREAD.
871 #include <sys/signal.h>
873 int x = SIGEV_THREAD;
875 ac_cv_c_sigev_thread=yes
881 if test "$ac_cv_c_sigev_thread" = "yes" ; then
882 AC_CHECK_HEADERS(aio.h sys/aio.h)
883 AC_CHECK_LIB(rt, aio_read, [ LIBS="$LIBS -lrt" ],)
884 SIGVAL_PTR="undefined"
885 if test "$ac_cv_header_aio_h" = "yes" -o "$ac_cv_header_sys_aio_h" = "yes" ; then
886 AC_CHECK_MEMBER(union sigval.sigval_ptr,SIGVAL_PTR="sigval_ptr",, [
887 #include <sys/signal.h>
889 AC_CHECK_MEMBER(union sigval.sival_ptr,SIGVAL_PTR="sival_ptr",, [
890 #include <sys/signal.h>
892 if test "$SIGVAL_PTR" = "undefined" ; then
893 AC_MSG_ERROR([Unable to detect field name in 'union sigval'])
896 AC_DEFINE_UNQUOTED(SIGVAL_PTR,$SIGVAL_PTR,[Pointer field name in 'union sigval'])
899 AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
900 AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?))
904 AC_MSG_CHECKING(for socklen_t)
906 #include <sys/types.h>
907 #include <sys/socket.h>
911 ac_cv_c_socklen_t=yes
912 AC_DEFINE(HAVE_SOCKLEN_T)
918 AC_CHECK_FUNCS(trunc, , AC_MSG_CHECKING(for trunc in math.h)
919 AC_TRY_LINK([#include <math.h>],
922 AC_DEFINE(HAVE_TRUNC)
928 if test "x$ac_cv_truncl" != "xyes"; then
929 AC_CHECK_LIB(sunmath, aintl, [ AC_DEFINE(HAVE_AINTL) LIBS="$LIBS -lsunmath"])
932 dnl ****************************
933 dnl *** Look for /dev/random ***
934 dnl ****************************
936 AC_MSG_CHECKING([if usage of random device is requested])
937 AC_ARG_ENABLE(dev-random,
938 [ --disable-dev-random disable the use of the random device],
939 try_dev_random=$enableval, try_dev_random=yes)
940 AC_MSG_RESULT($try_dev_random)
944 NAME_DEV_RANDOM="/dev/srandom"
947 dnl Win32 does not have /dev/random, they have their own method...
949 *-*-mingw*|*-*-cygwin*)
950 ac_cv_have_dev_random = no
953 dnl Everywhere else, it's /dev/random
956 NAME_DEV_RANDOM="/dev/random"
960 AC_DEFINE_UNQUOTED(NAME_DEV_RANDOM, "$NAME_DEV_RANDOM")
962 dnl Now check if the device actually exists
964 if test "x$try_dev_random" = "xyes"; then
965 AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
966 [if test -r "$NAME_DEV_RANDOM" ; then
967 ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
968 if test "x$ac_cv_have_dev_random" = "xyes"; then
969 AC_DEFINE(HAVE_CRYPT_RNG)
972 AC_MSG_CHECKING(for random device)
973 ac_cv_have_dev_random=no
974 AC_MSG_RESULT(has been disabled)
977 if test "x$platform_win32" = "xyes"; then
978 AC_DEFINE(HAVE_CRYPT_RNG)
981 if test "x$ac_cv_have_dev_random" = "xno" \
982 && test "x$platform_win32" = "xno"; then
985 *** A system-provided entropy source was not found on this system.
986 *** Because of this, the System.Security.Cryptography random number generator
987 *** will throw a NotImplemented exception.
989 *** If you are seeing this message, and you know your system DOES have an
990 *** entropy collection in place, please contact <crichton@gimp.org> and
991 *** provide information about the system and how to access the random device.
993 *** Otherwise you can install either egd or prngd and set the environment
994 *** variable MONO_EGD_SOCKET to point to the daemon's socket to use that.
998 AC_MSG_CHECKING([if inter-process shared handles are requested])
999 AC_ARG_ENABLE(shared-handles, [ --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=yes)
1000 AC_MSG_RESULT($try_shared_handles)
1001 if test "x$try_shared_handles" != "xyes"; then
1002 AC_DEFINE(DISABLE_SHARED_HANDLES)
1003 AC_SUBST(DISABLE_SHARED_HANDLES)
1014 AC_ARG_WITH(icu, [ --with-icu=yes/no],
1015 if test x$with_icu = xno; then
1017 AC_MSG_RESULT(Will not probe for ICU)
1022 AC_PATH_PROG(ICU_CONFIG, icu-config, no)
1023 if test "x$ICU_CONFIG" = "xno" -o ! -x "$ICU_CONFIG"; then
1024 AC_MSG_WARN([Only invariant locale available; install ICU for I18N support])
1025 enable_icu="no, if you want full i18n support download it from: http://oss.software.ibm.com/icu/index.html"
1027 enable_icu="yes. Version: `$ICU_CONFIG --version`"
1029 ICU_CFLAGS=`$ICU_CONFIG --cppflags`
1030 ICU_LIBS=`$ICU_CONFIG --ldflags`
1033 AC_SUBST(ICU_CFLAGS)
1037 ACCESS_UNALIGNED="yes"
1044 # mips-sgi-irix5.* | mips-sgi-irix6.*)
1046 # ACCESS_UNALIGNED="no"
1054 x86_64-*-* | amd64-*-*)
1063 ACCESS_UNALIGNED="no"
1067 # alpha*-*-linux* | alpha*-*-osf*)
1069 # ACCESS_UNALIGNED="no"
1071 # ia64-*-linux* | ia64-*-hpux*)
1075 # ACCESS_UNALIGNED="no";
1076 # case "$host_os" in
1077 # linux*) LIBC="libc.so.6.1";;
1078 # hpux*) LIBC="libc.so.1";;
1084 hppa2.0w-hp-hpux11.00 | hppa64-hp-hpux11.00)
1088 ACCESS_UNALIGNED="no"
1090 macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | \
1091 powerpc-*-sysv* | powerpc-*-darwin*)
1097 arm-*-linux-* | armv4l-*-linux-*)
1100 ACCESS_UNALIGNED="no"
1105 ACCESS_UNALIGNED="no"
1110 AC_ARG_WITH(jit, [ --with-jit=yes,no If you want to build scripts that default to the JIT],[
1115 if test x$JIT_SUPPORTED = xyes; then
1116 if $jit_wanted; then
1118 jit_status="Building and using the JIT"
1120 jit_status="Building the JIT, defaulting to the interpreter"
1123 jit_status="interpreter"
1126 AM_CONDITIONAL(USE_JIT, test x$USEJIT = xtrue)
1138 if test ${TARGET} = ARM; then
1139 dnl ******************************************
1140 dnl *** Check to see what FPU is available ***
1141 dnl ******************************************
1142 AC_MSG_CHECKING(which FPU to use)
1144 AC_TRY_COMPILE([], [
1145 __asm__ ("ldfd f0, [r0]");
1147 AC_TRY_COMPILE([], [
1148 __asm__ ("fldd d0, [r0]");
1149 ], fpu=VFP, fpu=NONE)
1153 CPPFLAGS="$CPPFLAGS -DARM_FPU_$fpu"
1157 if test ${TARGET} = unknown; then
1158 CPPFLAGS="$CPPFLAGS -DNO_PORT"
1159 AC_MSG_WARN("mono has not been ported to $host: some things may not work.")
1162 if test ${ACCESS_UNALIGNED} = no; then
1163 CPPFLAGS="$CPPFLAGS -DNO_UNALIGNED_ACCESS"
1167 AC_ARG_WITH(preview, [ --with-preview=yes,no If you want to install the 2.0 FX preview],[
1168 if test x$with_preview = xyes; then
1173 AM_CONDITIONAL(INSTALL_2_0, test x$PREVIEW = xyes)
1175 AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
1176 AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
1177 AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
1178 AM_CONDITIONAL(X86, test x$TARGET = xX86)
1179 AM_CONDITIONAL(AMD64, test x$TARGET = xAMD64)
1180 AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
1181 AM_CONDITIONAL(IA64, test x$TARGET = xIA64)
1182 AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
1183 AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
1184 AM_CONDITIONAL(ARM, test x$TARGET = xARM)
1185 AM_CONDITIONAL(S390, test x$TARGET = xS390)
1186 AM_CONDITIONAL(HPPA, test x$TARGET = xHPPA)
1188 AM_CONDITIONAL(JIT_SUPPORTED, test x$JIT_SUPPORTED = xyes)
1192 AC_SUBST(arch_target)
1203 mono/metadata/Makefile
1208 mono/os/win32/Makefile
1209 mono/os/unix/Makefile
1210 mono/arch/x86/Makefile
1211 mono/arch/amd64/Makefile
1212 mono/arch/hppa/Makefile
1213 mono/arch/ppc/Makefile
1214 mono/arch/sparc/Makefile
1215 mono/arch/s390/Makefile
1216 mono/arch/arm/Makefile
1217 mono/arch/alpha/Makefile
1218 mono/interpreter/Makefile
1220 mono/tests/tests-config
1221 mono/benchmark/Makefile
1222 mono/monoburg/Makefile
1223 mono/monograph/Makefile
1224 mono/io-layer/Makefile
1225 mono/handles/Makefile
1227 mono/profiler/Makefile
1230 runtime/net_1_1/Makefile
1231 runtime/net_2_0/Makefile
1242 tools/locale-builder/Makefile
1250 SIGALTSTACK: $with_sigaltstack
1253 JNI support: $jdk_headers_found