3 AM_CONFIG_HEADER(config.h)
4 AM_INIT_AUTOMAKE(mono,0.94)
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 # So libgc configure gets -mno-cygwin
47 # latest libgc already defines GC_WIN32_THREADS
48 # CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS -DWIN32_THREADS"
49 CPPFLAGS="$CPPFLAGS -DWIN32_THREADS"
56 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
57 libmono_cflags="-D_REENTRANT"
58 LDFLAGS="$LDFLAGS -pthread"
59 libmono_ldflags="-pthread"
64 *-*-*freebsd*|*-*-*openbsd*)
66 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
67 libmono_cflags="-D_THREAD_SAFE"
68 LDFLAGS="$LDFLAGS -pthread"
69 libmono_ldflags="-pthread"
71 AC_DEFINE(PTHREAD_POINTER_ID)
73 libgc_threads=pthreads
77 CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT"
78 libmono_cflags="-D_REENTRANT"
79 libmono_ldflags="-lpthread"
81 libgc_threads=pthreads
85 CPPFLAGS="$CPPFLAGS -DGC_HPUX_THREADS -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_REENTRANT"
86 CFLAGS="$CFLAGS +ESdbgasm"
88 libmono_cflags="-D_REENTRANT"
89 libmono_ldflags="-lpthread"
90 libgc_threads=pthreads
95 CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT"
97 libmono_cflags="-D_REENTRANT"
98 libgc_threads=pthreads
102 CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE -DGC_MACOSX_THREADS"
103 libmono_cflags="-D_THREAD_SAFE"
104 LDFLAGS="$LDFLAGS -pthread"
105 libmono_ldflags="-pthread"
107 AC_DEFINE(PTHREAD_POINTER_ID)
108 AC_DEFINE(USE_MACH_SEMA)
109 no_version_script=yes
111 libgc_threads=pthreads
114 AC_MSG_WARN([*** Please add $host to configure.in checks!])
121 if test x$need_link_unlink = xyes; then
122 AC_DEFINE(NEED_LINK_UNLINK, 1, [Define if Unix sockets cannot be created in an anonymous namespace])
125 AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
127 AC_CHECK_TOOL(CC, gcc, gcc)
131 dnl We should use AM_PROG_AS, but it's not available on automake/aclocal 1.4
133 # Set ASFLAGS if not already set.
134 : ${CCASFLAGS='$(CFLAGS)'}
138 AC_CHECK_PROG(BISON, bison,yes,no)
139 if test "x$BISON" = "xno";
141 AC_MSG_ERROR([You need to install bison])
144 dnl may require a specific autoconf version
145 dnl AC_PROG_CC_FOR_BUILD
146 dnl CC_FOR_BUILD not automatically detected
149 if test "x$cross_compiling" = "xyes"; then
153 AC_SUBST(CC_FOR_BUILD)
155 AC_SUBST(BUILD_EXEEXT)
162 # Test whenever ld supports -version-script
165 if test "x$lt_cv_prog_gnu_ld" = "xno"; then
166 no_version_script=yes
169 AM_CONDITIONAL(NO_VERSION_SCRIPT, test x$no_version_script = xyes)
171 AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h sys/un.h)
173 # for mono/mini/tramp-x86.c
174 AC_CHECK_HEADERS(valgrind/memcheck.h)
176 # for mono/metadata/debug-symfile.c
177 AC_CHECK_HEADERS(elf.h)
180 AC_CHECK_HEADERS(wchar.h)
182 # not 64 bit clean in cross-compile
183 AC_CHECK_SIZEOF(void *, 4)
186 if test x"$GCC" = xyes; then
187 WARN='-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
188 # The runtime code does not respect ANSI C strict aliasing rules
189 CFLAGS="$CFLAGS -fno-strict-aliasing"
191 # The Sun Forte compiler complains about inline functions that access static variables
192 # so disable all inlining.
195 CFLAGS="$CFLAGS -Dinline="
199 CFLAGS="$CFLAGS -g $WARN"
201 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
202 if test "x$PKG_CONFIG" = "xno"; then
203 AC_MSG_ERROR([You need to install pkg-config])
206 dnl for use on the build system
207 dnl pkg-config is stupid
208 BUILD_GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
209 BUILD_GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
210 AC_SUBST(BUILD_GLIB_CFLAGS)
211 AC_SUBST(BUILD_GLIB_LIBS)
214 AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir],
215 if test x$with_crosspkgdir = "x"; then
216 if test -s $PKG_CONFIG_PATH; then
217 PKG_PATH=$PKG_CONFIG_PATH
220 PKG_PATH=$with_crosspkgdir
221 PKG_CONFIG_PATH=$PKG_PATH
222 export PKG_CONFIG_PATH
226 ## Versions of dependencies
227 GLIB_REQUIRED_VERSION=1.3.11
229 PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)
231 GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
232 GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
233 GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
234 GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
236 AC_SUBST(GLIB_CFLAGS)
238 AC_SUBST(GMODULE_CFLAGS)
239 AC_SUBST(GMODULE_LIBS)
241 AC_ARG_WITH(gc, [ --with-gc=boehm,included,none],[gc=$with_gc],[gc=$gc_default])
243 # Enable support for NPTL only features like fast thread-local storage
244 # We can't reliably detect nptl at compile & run time
245 # so this option will stay until nptl becomes more widespread
246 AC_ARG_WITH(nptl, [ --with-nptl=yes,no enable/disable support for NPTL],[],[with_nptl=yes])
248 # Enable support for using sigaltstack for SIGSEGV and stack overflow handling
249 # This does not work on some platforms (bug #55253)
250 AC_ARG_WITH(sigaltstack, [ --with-sigaltstack=yes,no enable/disable support for sigaltstack],[],[with_sigaltstack=yes])
252 # assembly bundle support, see metadata/make-bundle.pl for more info
253 AC_ARG_WITH(bundle, [ --with-bundle=bundle_template],[
254 BUNDLE_FILE=$with_bundle
255 AC_SUBST(BUNDLE_FILE)
256 AC_DEFINE(WITH_BUNDLE)
258 AM_CONDITIONAL(WITH_BUNDLE, test x$with_bundle != xno)
265 AC_CHECK_HEADERS(gc.h gc/gc.h, gc_headers=yes)
266 AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes",,$libdl)
268 if test "x$found_boehm" != "xyes"; then
269 AC_MSG_ERROR("GC requested but libgc not found! Install libgc or run configure with --with-gc=none.")
271 if test "x$gc_headers" != "xyes"; then
272 AC_MSG_ERROR("GC requested but header files not found! You may need to install them by hand.")
275 AC_DEFINE(HAVE_BOEHM_GC)
276 AC_SUBST(HAVE_BOEHM_GC)
277 LIBGC_LIBS="-lgc $libdl"
279 # AC_CHECK_FUNCS does not work for some reason...
280 AC_CHECK_LIB(gc, GC_gcj_malloc, found_gcj_malloc="yes",,$libdl)
281 if test "x$found_gcj_malloc" = "xyes"; then
282 AC_DEFINE(HAVE_GC_GCJ_MALLOC)
284 AC_CHECK_LIB(gc, GC_enable, found_gc_enable="yes",,$libdl)
285 if test "x$found_gc_enable" = "xyes"; then
286 AC_DEFINE(HAVE_GC_ENABLE)
291 AC_CONFIG_SUBDIRS(libgc)
298 LIBGC_CFLAGS='-I$(top_srcdir)/libgc/include'
299 LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la'
301 AC_DEFINE(HAVE_BOEHM_GC)
302 AC_SUBST(HAVE_BOEHM_GC)
305 AC_DEFINE(USE_INCLUDED_LIBGC)
307 # The included libgc contains GCJ support
308 AC_DEFINE(HAVE_GC_GCJ_MALLOC)
309 AC_DEFINE(HAVE_GC_ENABLE)
313 AC_MSG_WARN("Compiling mono without GC.")
316 AC_MSG_ERROR([Invalid argument to --with-gc.])
321 # tell libgc/configure about what we want
322 ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads"
324 AM_CONDITIONAL(INCLUDED_LIBGC, test x$use_included_gc = xyes)
325 AC_SUBST(LIBGC_CFLAGS)
330 dnl End of libgc checks
333 if test x$platform_win32 = xno; then
335 dnl ******************************************************************
336 dnl *** Checks for the IKVM JNI interface library ***
337 dnl ******************************************************************
338 AC_ARG_WITH(ikvm-jni, [ --with-ikvm-jni=yes,no build the IKVM JNI interface library],[with_ikvm_jni=$withval],[with_ikvm_jni=yes])
339 AC_ARG_WITH(jdk, [ --with-jdk=DIRECTORY Use JDK from DIRECTORY],[with_jdk_dir=$withval],[with_jdk_dir=])
342 if test x$with_ikvm_jni = xyes; then
343 AC_MSG_CHECKING([JDK headers])
345 if test x$with_jdk_dir = x; then
346 # Try JAVA_HOME variable
347 if test x$JAVA_HOME != x; then
348 with_jdk_dir=$JAVA_HOME
353 if test -d $with_jdk_dir/include; then
354 jdk_headers_found=yes
356 if test -d $with_jdk_dir/include/linux; then
359 if test -d $with_jdk_dir/include/solaris; then
362 if test -f $with_jdk_dir/include/jni_md.h; then
363 # GNU Classpath sources
374 if test x$jdk_headers_found = xyes; then
375 AC_MSG_RESULT($with_jdk_dir/include $with_jdk_dir/include/$jdk_platform)
377 AC_MSG_RESULT(not found)
380 if test x$jdk_headers_found = xyes; then
381 ikvm_jni_dir=ikvm-jni
382 IKVM_JNI_CFLAGS="-I$with_jdk_dir/include -I$with_jdk_dir/include/$jdk_platform"
386 AC_SUBST(ikvm_jni_dir)
387 AC_SUBST(IKVM_JNI_CFLAGS)
389 AC_CHECK_FUNCS(getgrgid_r)
390 AC_CHECK_FUNCS(getgrnam_r)
391 AC_CHECK_FUNCS(getpwnam_r)
392 AC_CHECK_FUNCS(getpwuid_r)
393 AC_CHECK_FUNCS(getresuid)
394 AC_CHECK_FUNCS(setresuid)
396 dnl ******************************************************************
397 dnl *** Check for large file support ***
398 dnl *** (If we were using autoconf 2.50 we'd use AC_SYS_LARGEFILE) ***
399 dnl ******************************************************************
401 # Check that off_t can represent 2**63 - 1 correctly, working around
402 # potential compiler bugs. Defines LARGE_FILE_SUPPORT, adds $1 to
403 # CPPFLAGS and sets $large_offt to yes if the test succeeds
405 AC_DEFUN(LARGE_FILES, [
406 large_CPPFLAGS=$CPPFLAGS
407 CPPFLAGS="$CPPFLAGS $1"
409 #include <sys/types.h>
411 #define BIG_OFF_T (((off_t)1<<62)-1+((off_t)1<<62))
414 int big_off_t=((BIG_OFF_T%2147483629==721) &&
415 (BIG_OFF_T%2147483647==1));
424 AC_DEFINE(HAVE_LARGE_FILE_SUPPORT)
425 large_CPPFLAGS="$large_CPPFLAGS $1"
430 CPPFLAGS=$large_CPPFLAGS
433 AC_MSG_CHECKING(if off_t is 64 bits wide)
435 if test $large_offt = no; then
436 AC_MSG_CHECKING(if _FILE_OFFSET_BITS=64 gives 64 bit off_t)
437 LARGE_FILES("-D_FILE_OFFSET_BITS=64")
439 if test $large_offt = no; then
440 AC_MSG_WARN([No 64 bit file size support available])
443 dnl *****************************
444 dnl *** Checks for libsocket ***
445 dnl *****************************
446 AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
448 dnl *******************************
449 dnl *** Checks for MSG_NOSIGNAL ***
450 dnl *******************************
451 AC_MSG_CHECKING(for MSG_NOSIGNAL)
452 AC_TRY_COMPILE([#include <sys/socket.h>], [
453 int f = MSG_NOSIGNAL;
457 AC_DEFINE(HAVE_MSG_NOSIGNAL)
459 # We'll have to use signals
463 dnl *****************************
464 dnl *** Checks for SOL_IP ***
465 dnl *****************************
466 AC_MSG_CHECKING(for SOL_IP)
467 AC_TRY_COMPILE([#include <netdb.h>], [
472 AC_DEFINE(HAVE_SOL_IP)
474 # We'll have to use getprotobyname
478 dnl *****************************
479 dnl *** Checks for SOL_IPV6 ***
480 dnl *****************************
481 AC_MSG_CHECKING(for SOL_IPV6)
482 AC_TRY_COMPILE([#include <netdb.h>], [
483 int level = SOL_IPV6;
487 AC_DEFINE(HAVE_SOL_IPV6)
489 # We'll have to use getprotobyname
493 dnl *****************************
494 dnl *** Checks for SOL_TCP ***
495 dnl *****************************
496 AC_MSG_CHECKING(for SOL_TCP)
497 AC_TRY_COMPILE([#include <netdb.h>], [
502 AC_DEFINE(HAVE_SOL_TCP)
504 # We'll have to use getprotobyname
508 dnl *****************************
509 dnl *** Checks for IP_PKTINFO ***
510 dnl *****************************
511 AC_MSG_CHECKING(for IP_PKTINFO)
512 AC_TRY_COMPILE([#include <netdb.h>], [
513 int level = IP_PKTINFO;
517 AC_DEFINE(HAVE_IP_PKTINFO)
522 dnl *********************************
523 dnl *** Check for struct ip_mreqn ***
524 dnl *********************************
525 AC_MSG_CHECKING(for struct ip_mreqn)
526 AC_TRY_COMPILE([#include <netinet/in.h>], [
527 struct ip_mreqn mreq;
528 mreq.imr_address.s_addr = 0;
532 AC_DEFINE(HAVE_STRUCT_IP_MREQN)
534 # We'll just have to try and use struct ip_mreq
536 AC_MSG_CHECKING(for struct ip_mreq)
537 AC_TRY_COMPILE([#include <netinet/in.h>], [
539 mreq.imr_interface.s_addr = 0;
543 AC_DEFINE(HAVE_STRUCT_IP_MREQ)
545 # No multicast support
550 dnl **********************************
551 dnl *** Check for gethostbyname2_r ***
552 dnl **********************************
553 AC_MSG_CHECKING(for gethostbyname2_r)
554 AC_TRY_LINK([#include <netdb.h>], [
555 gethostbyname2_r(NULL,0,NULL,NULL,0,NULL,NULL);
559 AC_DEFINE(HAVE_GETHOSTBYNAME2_R)
564 dnl *****************************
565 dnl *** Checks for libnsl ***
566 dnl *****************************
567 AC_CHECK_LIB(nsl, gethostbyaddr, LIBS="$LIBS -lnsl")
569 AC_CHECK_FUNCS(inet_pton inet_aton)
571 dnl ***********************************************
572 dnl *** Checks for size of sockaddr_un.sun_path ***
573 dnl ***********************************************
574 # AC_CHECK_SIZEOF can't cope with struct members :-(
575 AC_MSG_CHECKING(size of sockaddr_un.sun_path)
576 AC_CACHE_VAL(cv_mono_sizeof_sunpath,
578 #include <sys/types.h>
583 struct sockaddr_un sock_un;
584 FILE *f=fopen("conftestval", "w");
586 fprintf(f, "%d\n", sizeof(sock_un.sun_path));
589 ], cv_mono_sizeof_sunpath=`cat conftestval`,
590 cv_mono_sizeof_sunpath=0,
591 cv_mono_sizeof_sunpath=0)])dnl
592 AC_MSG_RESULT($cv_mono_sizeof_sunpath)
593 AC_DEFINE_UNQUOTED(MONO_SIZEOF_SUNPATH, $cv_mono_sizeof_sunpath)
595 dnl *************************************
596 dnl *** Checks for zero length arrays ***
597 dnl *************************************
598 AC_MSG_CHECKING(whether $CC supports zero length arrays)
606 AC_DEFINE_UNQUOTED(MONO_ZERO_ARRAY_LENGTH, 0)
609 AC_DEFINE_UNQUOTED(MONO_ZERO_ARRAY_LENGTH, 1)
612 dnl *****************************
613 dnl *** Checks for libxnet ***
614 dnl *****************************
617 AC_MSG_CHECKING(for Solaris XPG4 support)
618 if test -f /usr/lib/libxnet.so; then
619 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
620 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
621 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED=1"
628 if test "$GCC" = "yes"; then
629 CFLAGS="$CFLAGS -Wno-char-subscripts"
634 dnl *****************************
635 dnl *** Checks for libpthread ***
636 dnl *****************************
637 AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread")
638 AC_CHECK_HEADERS(pthread.h)
639 AC_CHECK_FUNCS(pthread_mutex_timedlock)
640 AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np)
641 AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
642 AC_TRY_COMPILE([ #include <pthread.h>], [
643 pthread_mutexattr_t attr;
644 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
649 AC_MSG_WARN(Using mono_mutex_t for recursive mutexes)
650 AC_DEFINE(USE_MONO_MUTEX)
652 AC_CHECK_FUNCS(pthread_attr_setstacksize)
654 dnl ***********************************
655 dnl *** Checks for working __thread ***
656 dnl ***********************************
657 AC_MSG_CHECKING(for working __thread)
658 if test "x$with_nptl" != "xyes"; then
659 AC_MSG_RESULT(disabled)
665 static int res1, res2;
667 void thread_main (void *arg)
682 pthread_create (&t1, NULL, thread_main, 1);
683 pthread_create (&t2, NULL, thread_main, 2);
685 pthread_join (t1, NULL);
686 pthread_join (t2, NULL);
688 return !(res1 + res2 == 2);
692 AC_DEFINE(HAVE_KW_THREAD)
698 dnl **************************************
699 dnl *** Checks for working sigaltstack ***
700 dnl **************************************
701 AC_MSG_CHECKING(for working sigaltstack)
702 if test "x$with_sigaltstack" != "xyes"; then
703 AC_MSG_RESULT(disabled)
711 #include <sys/wait.h>
714 sigsegv_signal_handler (int _dummy, siginfo_t *info, void *context)
732 struct sigaltstack sas;
736 sa.sa_sigaction = sigsegv_signal_handler;
737 sigemptyset (&sa.sa_mask);
738 sa.sa_flags = SA_SIGINFO | SA_STACK;
739 if (sigaction (SIGSEGV, &sa, NULL) == -1) {
744 sas.ss_sp = malloc (SIGSTKSZ);
745 sas.ss_size = SIGSTKSZ;
746 sas.ss_flags = SS_ONSTACK;
747 if (sigaltstack (&sas, NULL) == -1) {
752 pthread_attr_init (&attr);
753 if (pthread_create(&id, &attr, loop, &attr) != 0) {
778 for (i = 0; i < 3; ++i) {
780 waitpid (son, &status, WNOHANG);
781 if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
791 AC_DEFINE(HAVE_WORKING_SIGALTSTACK)
798 dnl ********************************
799 dnl *** Checks for semaphore lib ***
800 dnl ********************************
801 # 'Real Time' functions on Solaris
802 # posix4 on Solaris 2.6
803 # pthread (first!) on Linux
804 AC_SEARCH_LIBS(sem_init, pthread rt posix4)
806 dnl ********************************
807 dnl *** Checks for timezone stuff **
808 dnl ********************************
809 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
815 ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
816 if test $ac_cv_struct_tm_gmtoff = yes; then
817 AC_DEFINE(HAVE_TM_GMTOFF)
819 AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
824 ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
825 if test $ac_cv_var_timezone = yes; then
826 AC_DEFINE(HAVE_TIMEZONE)
828 AC_ERROR(unable to find a way to determine timezone)
832 dnl *********************************
833 dnl *** Checks for math functions ***
834 dnl *********************************
836 AC_CHECK_FUNCS(finite, , AC_MSG_CHECKING(for finite in math.h)
837 AC_TRY_LINK([#include <math.h>],
839 AC_DEFINE(HAVE_FINITE) AC_MSG_RESULT(yes),
841 AC_CHECK_FUNCS(isfinite, , AC_MSG_CHECKING(for isfinite in math.h)
842 AC_TRY_LINK([#include <math.h>],
844 AC_DEFINE(HAVE_ISFINITE) AC_MSG_RESULT(yes),
847 dnl ****************************************************************
848 dnl *** Checks for working poll() (macosx defines it but doesn't ***
849 dnl *** have it in the library (duh)) ***
850 dnl ****************************************************************
853 dnl *************************
854 dnl *** Check for signbit ***
855 dnl *************************
856 AC_MSG_CHECKING(for signbit)
857 AC_TRY_LINK([#include <math.h>], [
858 int s = signbit(1.0);
861 AC_DEFINE(HAVE_SIGNBIT)
866 dnl *********************
867 dnl *** Check for AIO ***
868 dnl *********************
869 AC_MSG_CHECKING([for SIGEV_THREAD definition])
870 dnl Some systems (FreeBSD at least) may have aio_read
871 dnl but don't support/define SIGEV_THREAD.
873 #include <sys/signal.h>
875 int x = SIGEV_THREAD;
877 ac_cv_c_sigev_thread=yes
883 if test "$ac_cv_c_sigev_thread" = "yes" ; then
884 AC_CHECK_HEADERS(aio.h sys/aio.h)
885 AC_CHECK_LIB(rt, aio_read, [ LIBS="$LIBS -lrt" ],)
886 SIGVAL_PTR="undefined"
887 if test "$ac_cv_header_aio_h" = "yes" -o "$ac_cv_header_sys_aio_h" = "yes" ; then
888 AC_CHECK_MEMBER(union sigval.sigval_ptr,SIGVAL_PTR="sigval_ptr",, [
889 #include <sys/signal.h>
891 AC_CHECK_MEMBER(union sigval.sival_ptr,SIGVAL_PTR="sival_ptr",, [
892 #include <sys/signal.h>
894 if test "$SIGVAL_PTR" = "undefined" ; then
895 AC_MSG_ERROR([Unable to detect field name in 'union sigval'])
898 AC_DEFINE_UNQUOTED(SIGVAL_PTR,$SIGVAL_PTR,[Pointer field name in 'union sigval'])
901 AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
902 AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?))
906 AC_MSG_CHECKING(for socklen_t)
908 #include <sys/types.h>
909 #include <sys/socket.h>
913 ac_cv_c_socklen_t=yes
914 AC_DEFINE(HAVE_SOCKLEN_T)
920 AC_CHECK_FUNCS(trunc, , AC_MSG_CHECKING(for trunc in math.h)
921 AC_TRY_LINK([#include <math.h>],
924 AC_DEFINE(HAVE_TRUNC)
930 if test "x$ac_cv_truncl" != "xyes"; then
931 AC_CHECK_LIB(sunmath, aintl, [ AC_DEFINE(HAVE_AINTL) LIBS="$LIBS -lsunmath"])
934 dnl ****************************
935 dnl *** Look for /dev/random ***
936 dnl ****************************
938 AC_MSG_CHECKING([if usage of random device is requested])
939 AC_ARG_ENABLE(dev-random,
940 [ --disable-dev-random disable the use of the random device],
941 try_dev_random=$enableval, try_dev_random=yes)
942 AC_MSG_RESULT($try_dev_random)
946 NAME_DEV_RANDOM="/dev/srandom"
949 dnl Win32 does not have /dev/random, they have their own method...
951 *-*-mingw*|*-*-cygwin*)
952 ac_cv_have_dev_random = no
955 dnl Everywhere else, it's /dev/random
958 NAME_DEV_RANDOM="/dev/random"
962 AC_DEFINE_UNQUOTED(NAME_DEV_RANDOM, "$NAME_DEV_RANDOM")
964 dnl Now check if the device actually exists
966 if test "x$try_dev_random" = "xyes"; then
967 AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
968 [if test -r "$NAME_DEV_RANDOM" ; then
969 ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
970 if test "x$ac_cv_have_dev_random" = "xyes"; then
971 AC_DEFINE(HAVE_CRYPT_RNG)
974 AC_MSG_CHECKING(for random device)
975 ac_cv_have_dev_random=no
976 AC_MSG_RESULT(has been disabled)
979 if test "x$platform_win32" = "xyes"; then
980 AC_DEFINE(HAVE_CRYPT_RNG)
983 if test "x$ac_cv_have_dev_random" = "xno" \
984 && test "x$platform_win32" = "xno"; then
987 *** A system-provided entropy source was not found on this system.
988 *** Because of this, the System.Security.Cryptography random number generator
989 *** will throw a NotImplemented exception.
991 *** If you are seeing this message, and you know your system DOES have an
992 *** entropy collection in place, please contact <crichton@gimp.org> and
993 *** provide information about the system and how to access the random device.
995 *** Otherwise you can install either egd or prngd and set the environment
996 *** variable MONO_EGD_SOCKET to point to the daemon's socket to use that.
1000 AC_MSG_CHECKING([if inter-process shared handles are requested])
1001 AC_ARG_ENABLE(shared-handles, [ --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=yes)
1002 AC_MSG_RESULT($try_shared_handles)
1003 if test "x$try_shared_handles" != "xyes"; then
1004 AC_DEFINE(DISABLE_SHARED_HANDLES)
1005 AC_SUBST(DISABLE_SHARED_HANDLES)
1016 AC_ARG_WITH(icu, [ --with-icu=yes/no],
1017 if test x$with_icu = xno; then
1019 AC_MSG_RESULT(Will not probe for ICU)
1024 AC_PATH_PROG(ICU_CONFIG, icu-config, no)
1025 if test "x$ICU_CONFIG" = "xno" -o ! -x "$ICU_CONFIG"; then
1026 AC_MSG_WARN([Only invariant locale available; install ICU for I18N support])
1027 enable_icu="no, if you want full i18n support download it from: http://oss.software.ibm.com/icu/index.html"
1029 enable_icu="yes. Version: `$ICU_CONFIG --version`"
1031 ICU_CFLAGS=`$ICU_CONFIG --cppflags`
1032 ICU_LIBS=`$ICU_CONFIG --ldflags`
1035 AC_SUBST(ICU_CFLAGS)
1039 ACCESS_UNALIGNED="yes"
1046 # mips-sgi-irix5.* | mips-sgi-irix6.*)
1048 # ACCESS_UNALIGNED="no"
1056 x86_64-*-* | amd64-*-*)
1065 ACCESS_UNALIGNED="no"
1069 # alpha*-*-linux* | alpha*-*-osf*)
1071 # ACCESS_UNALIGNED="no"
1073 # ia64-*-linux* | ia64-*-hpux*)
1077 # ACCESS_UNALIGNED="no";
1078 # case "$host_os" in
1079 # linux*) LIBC="libc.so.6.1";;
1080 # hpux*) LIBC="libc.so.1";;
1086 hppa2.0w-hp-hpux11.00 | hppa64-hp-hpux11.00)
1090 ACCESS_UNALIGNED="no"
1092 macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | \
1093 powerpc-*-sysv* | powerpc-*-darwin*)
1099 arm-*-linux-* | armv4l-*-linux-*)
1102 ACCESS_UNALIGNED="no"
1107 ACCESS_UNALIGNED="no"
1112 AC_ARG_WITH(jit, [ --with-jit=yes,no If you want to build scripts that default to the JIT],[
1117 if test x$JIT_SUPPORTED = xyes; then
1118 if $jit_wanted; then
1120 jit_status="Building and using the JIT"
1122 jit_status="Building the JIT, defaulting to the interpreter"
1125 jit_status="interpreter"
1128 AM_CONDITIONAL(USE_JIT, test x$USEJIT = xtrue)
1140 if test ${TARGET} = ARM; then
1141 dnl ******************************************
1142 dnl *** Check to see what FPU is available ***
1143 dnl ******************************************
1144 AC_MSG_CHECKING(which FPU to use)
1146 AC_TRY_COMPILE([], [
1147 __asm__ ("ldfd f0, [r0]");
1149 AC_TRY_COMPILE([], [
1150 __asm__ ("fldd d0, [r0]");
1151 ], fpu=VFP, fpu=NONE)
1155 CPPFLAGS="$CPPFLAGS -DARM_FPU_$fpu"
1159 if test ${TARGET} = unknown; then
1160 CPPFLAGS="$CPPFLAGS -DNO_PORT"
1161 AC_MSG_WARN("mono has not been ported to $host: some things may not work.")
1164 if test ${ACCESS_UNALIGNED} = no; then
1165 CPPFLAGS="$CPPFLAGS -DNO_UNALIGNED_ACCESS"
1169 AC_ARG_WITH(preview, [ --with-preview=yes,no If you want to install the 2.0 FX preview],[
1170 if test x$with_preview = xyes; then
1175 AM_CONDITIONAL(INSTALL_2_0, test x$PREVIEW = xyes)
1177 AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
1178 AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
1179 AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
1180 AM_CONDITIONAL(X86, test x$TARGET = xX86)
1181 AM_CONDITIONAL(AMD64, test x$TARGET = xAMD64)
1182 AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
1183 AM_CONDITIONAL(IA64, test x$TARGET = xIA64)
1184 AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
1185 AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
1186 AM_CONDITIONAL(ARM, test x$TARGET = xARM)
1187 AM_CONDITIONAL(S390, test x$TARGET = xS390)
1188 AM_CONDITIONAL(HPPA, test x$TARGET = xHPPA)
1190 AM_CONDITIONAL(JIT_SUPPORTED, test x$JIT_SUPPORTED = xyes)
1194 AC_SUBST(arch_target)
1205 mono/metadata/Makefile
1210 mono/os/win32/Makefile
1211 mono/os/unix/Makefile
1212 mono/arch/x86/Makefile
1213 mono/arch/amd64/Makefile
1214 mono/arch/hppa/Makefile
1215 mono/arch/ppc/Makefile
1216 mono/arch/sparc/Makefile
1217 mono/arch/s390/Makefile
1218 mono/arch/arm/Makefile
1219 mono/arch/alpha/Makefile
1220 mono/interpreter/Makefile
1222 mono/tests/tests-config
1223 mono/benchmark/Makefile
1224 mono/monoburg/Makefile
1225 mono/monograph/Makefile
1226 mono/io-layer/Makefile
1227 mono/handles/Makefile
1229 mono/profiler/Makefile
1232 runtime/net_1_1/Makefile
1233 runtime/net_2_0/Makefile
1244 tools/locale-builder/Makefile
1252 SIGALTSTACK: $with_sigaltstack
1255 JNI support: $jdk_headers_found