3 AM_CONFIG_HEADER(config.h)
4 AM_INIT_AUTOMAKE(mono,0.95)
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"
59 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
60 libmono_cflags="-D_REENTRANT"
61 LDFLAGS="$LDFLAGS -pthread"
62 libmono_ldflags="-pthread"
67 *-*-*freebsd*|*-*-*openbsd*)
69 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
70 libmono_cflags="-D_THREAD_SAFE"
71 LDFLAGS="$LDFLAGS -pthread"
72 libmono_ldflags="-pthread"
74 AC_DEFINE(PTHREAD_POINTER_ID)
76 libgc_threads=pthreads
80 CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT"
81 libmono_cflags="-D_REENTRANT"
82 libmono_ldflags="-lpthread"
84 libgc_threads=pthreads
88 CPPFLAGS="$CPPFLAGS -DGC_HPUX_THREADS -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_REENTRANT"
89 CFLAGS="$CFLAGS +ESdbgasm"
91 libmono_cflags="-D_REENTRANT"
92 libmono_ldflags="-lpthread"
93 libgc_threads=pthreads
98 CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT"
100 libmono_cflags="-D_REENTRANT"
101 libgc_threads=pthreads
105 CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE -DGC_MACOSX_THREADS"
106 libmono_cflags="-D_THREAD_SAFE"
107 LDFLAGS="$LDFLAGS -pthread"
108 libmono_ldflags="-pthread"
110 AC_DEFINE(PTHREAD_POINTER_ID)
111 AC_DEFINE(USE_MACH_SEMA)
112 no_version_script=yes
114 libgc_threads=pthreads
117 AC_MSG_WARN([*** Please add $host to configure.in checks!])
124 if test x$need_link_unlink = xyes; then
125 AC_DEFINE(NEED_LINK_UNLINK, 1, [Define if Unix sockets cannot be created in an anonymous namespace])
128 AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
130 AC_CHECK_TOOL(CC, gcc, gcc)
134 dnl We should use AM_PROG_AS, but it's not available on automake/aclocal 1.4
136 # Set ASFLAGS if not already set.
137 : ${CCASFLAGS='$(CFLAGS)'}
141 AC_CHECK_PROG(BISON, bison,yes,no)
142 if test "x$BISON" = "xno";
144 AC_MSG_ERROR([You need to install bison])
147 dnl may require a specific autoconf version
148 dnl AC_PROG_CC_FOR_BUILD
149 dnl CC_FOR_BUILD not automatically detected
152 if test "x$cross_compiling" = "xyes"; then
156 AC_SUBST(CC_FOR_BUILD)
158 AC_SUBST(BUILD_EXEEXT)
165 # Test whenever ld supports -version-script
168 if test "x$lt_cv_prog_gnu_ld" = "xno"; then
169 no_version_script=yes
172 AM_CONDITIONAL(NO_VERSION_SCRIPT, test x$no_version_script = xyes)
174 AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h sys/un.h)
176 # for mono/mini/tramp-x86.c
177 AC_CHECK_HEADERS(valgrind/memcheck.h)
179 # for mono/metadata/debug-symfile.c
180 AC_CHECK_HEADERS(elf.h)
183 AC_CHECK_HEADERS(wchar.h)
185 # not 64 bit clean in cross-compile
186 AC_CHECK_SIZEOF(void *, 4)
189 if test x"$GCC" = xyes; then
190 WARN='-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
191 # The runtime code does not respect ANSI C strict aliasing rules
192 CFLAGS="$CFLAGS -fno-strict-aliasing"
194 # The Sun Forte compiler complains about inline functions that access static variables
195 # so disable all inlining.
198 CFLAGS="$CFLAGS -Dinline="
202 CFLAGS="$CFLAGS -g $WARN"
204 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
205 if test "x$PKG_CONFIG" = "xno"; then
206 AC_MSG_ERROR([You need to install pkg-config])
209 dnl for use on the build system
210 dnl pkg-config is stupid
211 BUILD_GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
212 BUILD_GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
213 AC_SUBST(BUILD_GLIB_CFLAGS)
214 AC_SUBST(BUILD_GLIB_LIBS)
217 AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir],
218 if test x$with_crosspkgdir = "x"; then
219 if test -s $PKG_CONFIG_PATH; then
220 PKG_PATH=$PKG_CONFIG_PATH
223 PKG_PATH=$with_crosspkgdir
224 PKG_CONFIG_PATH=$PKG_PATH
225 export PKG_CONFIG_PATH
229 ## Versions of dependencies
230 GLIB_REQUIRED_VERSION=1.3.11
232 PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)
234 GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
235 GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
236 GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
237 GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
239 AC_SUBST(GLIB_CFLAGS)
241 AC_SUBST(GMODULE_CFLAGS)
242 AC_SUBST(GMODULE_LIBS)
244 AC_ARG_WITH(gc, [ --with-gc=boehm,included,none],[gc=$with_gc],[gc=$gc_default])
246 # Enable support for NPTL only features like fast thread-local storage
247 # We can't reliably detect nptl at compile & run time
248 # so this option will stay until nptl becomes more widespread
249 AC_ARG_WITH(nptl, [ --with-nptl=yes,no enable/disable support for NPTL],[],[with_nptl=yes])
251 # Enable support for using sigaltstack for SIGSEGV and stack overflow handling
252 # This does not work on some platforms (bug #55253)
253 AC_ARG_WITH(sigaltstack, [ --with-sigaltstack=yes,no enable/disable support for sigaltstack],[],[with_sigaltstack=yes])
255 # assembly bundle support, see metadata/make-bundle.pl for more info
256 AC_ARG_WITH(bundle, [ --with-bundle=bundle_template],[
257 BUNDLE_FILE=$with_bundle
258 AC_SUBST(BUNDLE_FILE)
259 AC_DEFINE(WITH_BUNDLE)
261 AM_CONDITIONAL(WITH_BUNDLE, test x$with_bundle != xno)
268 AC_CHECK_HEADERS(gc.h gc/gc.h, gc_headers=yes)
269 AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes",,$libdl)
271 if test "x$found_boehm" != "xyes"; then
272 AC_MSG_ERROR("GC requested but libgc not found! Install libgc or run configure with --with-gc=none.")
274 if test "x$gc_headers" != "xyes"; then
275 AC_MSG_ERROR("GC requested but header files not found! You may need to install them by hand.")
278 AC_DEFINE(HAVE_BOEHM_GC)
279 AC_SUBST(HAVE_BOEHM_GC)
280 LIBGC_LIBS="-lgc $libdl"
282 # AC_CHECK_FUNCS does not work for some reason...
283 AC_CHECK_LIB(gc, GC_gcj_malloc, found_gcj_malloc="yes",,$libdl)
284 if test "x$found_gcj_malloc" = "xyes"; then
285 AC_DEFINE(HAVE_GC_GCJ_MALLOC)
287 AC_CHECK_LIB(gc, GC_enable, found_gc_enable="yes",,$libdl)
288 if test "x$found_gc_enable" = "xyes"; then
289 AC_DEFINE(HAVE_GC_ENABLE)
294 AC_CONFIG_SUBDIRS(libgc)
301 LIBGC_CFLAGS='-I$(top_srcdir)/libgc/include'
302 LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la'
304 AC_DEFINE(HAVE_BOEHM_GC)
305 AC_SUBST(HAVE_BOEHM_GC)
308 AC_DEFINE(USE_INCLUDED_LIBGC)
310 # The included libgc contains GCJ support
311 AC_DEFINE(HAVE_GC_GCJ_MALLOC)
312 AC_DEFINE(HAVE_GC_ENABLE)
316 AC_MSG_WARN("Compiling mono without GC.")
319 AC_MSG_ERROR([Invalid argument to --with-gc.])
324 # tell libgc/configure about what we want
325 ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads"
327 AM_CONDITIONAL(INCLUDED_LIBGC, test x$use_included_gc = xyes)
328 AC_SUBST(LIBGC_CFLAGS)
333 dnl End of libgc checks
336 if test x$platform_win32 = xno; then
338 dnl ******************************************************************
339 dnl *** Checks for the IKVM JNI interface library ***
340 dnl ******************************************************************
341 AC_ARG_WITH(ikvm-jni, [ --with-ikvm-jni=yes,no build the IKVM JNI interface library],[with_ikvm_jni=$withval],[with_ikvm_jni=yes])
342 AC_ARG_WITH(jdk, [ --with-jdk=DIRECTORY Use JDK from DIRECTORY],[with_jdk_dir=$withval],[with_jdk_dir=])
345 if test x$with_ikvm_jni = xyes; then
346 AC_MSG_CHECKING([JDK headers])
348 if test x$with_jdk_dir = x; then
349 # Try JAVA_HOME variable
350 if test x$JAVA_HOME != x; then
351 with_jdk_dir=$JAVA_HOME
356 if test -d $with_jdk_dir/include; then
357 jdk_headers_found=yes
359 if test -d $with_jdk_dir/include/linux; then
362 if test -d $with_jdk_dir/include/solaris; then
365 if test -f $with_jdk_dir/include/jni_md.h; then
366 # GNU Classpath sources
377 if test x$jdk_headers_found = xyes; then
378 AC_MSG_RESULT($with_jdk_dir/include $with_jdk_dir/include/$jdk_platform)
380 AC_MSG_RESULT(not found)
383 if test x$jdk_headers_found = xyes; then
384 ikvm_jni_dir=ikvm-jni
385 IKVM_JNI_CFLAGS="-I$with_jdk_dir/include -I$with_jdk_dir/include/$jdk_platform"
389 AC_SUBST(ikvm_jni_dir)
390 AC_SUBST(IKVM_JNI_CFLAGS)
392 AC_CHECK_FUNCS(getgrgid_r)
393 AC_CHECK_FUNCS(getgrnam_r)
394 AC_CHECK_FUNCS(getpwnam_r)
395 AC_CHECK_FUNCS(getpwuid_r)
396 AC_CHECK_FUNCS(getresuid)
397 AC_CHECK_FUNCS(setresuid)
399 dnl ******************************************************************
400 dnl *** Check for large file support ***
401 dnl *** (If we were using autoconf 2.50 we'd use AC_SYS_LARGEFILE) ***
402 dnl ******************************************************************
404 # Check that off_t can represent 2**63 - 1 correctly, working around
405 # potential compiler bugs. Defines LARGE_FILE_SUPPORT, adds $1 to
406 # CPPFLAGS and sets $large_offt to yes if the test succeeds
408 AC_DEFUN(LARGE_FILES, [
409 large_CPPFLAGS=$CPPFLAGS
410 CPPFLAGS="$CPPFLAGS $1"
412 #include <sys/types.h>
414 #define BIG_OFF_T (((off_t)1<<62)-1+((off_t)1<<62))
417 int big_off_t=((BIG_OFF_T%2147483629==721) &&
418 (BIG_OFF_T%2147483647==1));
427 AC_DEFINE(HAVE_LARGE_FILE_SUPPORT)
428 large_CPPFLAGS="$large_CPPFLAGS $1"
433 CPPFLAGS=$large_CPPFLAGS
436 AC_MSG_CHECKING(if off_t is 64 bits wide)
438 if test $large_offt = no; then
439 AC_MSG_CHECKING(if _FILE_OFFSET_BITS=64 gives 64 bit off_t)
440 LARGE_FILES("-D_FILE_OFFSET_BITS=64")
442 if test $large_offt = no; then
443 AC_MSG_WARN([No 64 bit file size support available])
446 dnl *****************************
447 dnl *** Checks for libsocket ***
448 dnl *****************************
449 AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
451 dnl *******************************
452 dnl *** Checks for MSG_NOSIGNAL ***
453 dnl *******************************
454 AC_MSG_CHECKING(for MSG_NOSIGNAL)
455 AC_TRY_COMPILE([#include <sys/socket.h>], [
456 int f = MSG_NOSIGNAL;
460 AC_DEFINE(HAVE_MSG_NOSIGNAL)
462 # We'll have to use signals
466 dnl *****************************
467 dnl *** Checks for SOL_IP ***
468 dnl *****************************
469 AC_MSG_CHECKING(for SOL_IP)
470 AC_TRY_COMPILE([#include <netdb.h>], [
475 AC_DEFINE(HAVE_SOL_IP)
477 # We'll have to use getprotobyname
481 dnl *****************************
482 dnl *** Checks for SOL_IPV6 ***
483 dnl *****************************
484 AC_MSG_CHECKING(for SOL_IPV6)
485 AC_TRY_COMPILE([#include <netdb.h>], [
486 int level = SOL_IPV6;
490 AC_DEFINE(HAVE_SOL_IPV6)
492 # We'll have to use getprotobyname
496 dnl *****************************
497 dnl *** Checks for SOL_TCP ***
498 dnl *****************************
499 AC_MSG_CHECKING(for SOL_TCP)
500 AC_TRY_COMPILE([#include <netdb.h>], [
505 AC_DEFINE(HAVE_SOL_TCP)
507 # We'll have to use getprotobyname
511 dnl *****************************
512 dnl *** Checks for IP_PKTINFO ***
513 dnl *****************************
514 AC_MSG_CHECKING(for IP_PKTINFO)
515 AC_TRY_COMPILE([#include <netdb.h>], [
516 int level = IP_PKTINFO;
520 AC_DEFINE(HAVE_IP_PKTINFO)
525 dnl *********************************
526 dnl *** Check for struct ip_mreqn ***
527 dnl *********************************
528 AC_MSG_CHECKING(for struct ip_mreqn)
529 AC_TRY_COMPILE([#include <netinet/in.h>], [
530 struct ip_mreqn mreq;
531 mreq.imr_address.s_addr = 0;
535 AC_DEFINE(HAVE_STRUCT_IP_MREQN)
537 # We'll just have to try and use struct ip_mreq
539 AC_MSG_CHECKING(for struct ip_mreq)
540 AC_TRY_COMPILE([#include <netinet/in.h>], [
542 mreq.imr_interface.s_addr = 0;
546 AC_DEFINE(HAVE_STRUCT_IP_MREQ)
548 # No multicast support
553 dnl **********************************
554 dnl *** Check for gethostbyname2_r ***
555 dnl **********************************
556 AC_MSG_CHECKING(for gethostbyname2_r)
557 AC_TRY_LINK([#include <netdb.h>], [
558 gethostbyname2_r(NULL,0,NULL,NULL,0,NULL,NULL);
562 AC_DEFINE(HAVE_GETHOSTBYNAME2_R)
567 dnl *****************************
568 dnl *** Checks for libnsl ***
569 dnl *****************************
570 AC_CHECK_LIB(nsl, gethostbyaddr, LIBS="$LIBS -lnsl")
572 AC_CHECK_FUNCS(inet_pton inet_aton)
574 dnl ***********************************************
575 dnl *** Checks for size of sockaddr_un.sun_path ***
576 dnl ***********************************************
577 # AC_CHECK_SIZEOF can't cope with struct members :-(
578 AC_MSG_CHECKING(size of sockaddr_un.sun_path)
579 AC_CACHE_VAL(cv_mono_sizeof_sunpath,
581 #include <sys/types.h>
586 struct sockaddr_un sock_un;
587 FILE *f=fopen("conftestval", "w");
589 fprintf(f, "%d\n", sizeof(sock_un.sun_path));
592 ], cv_mono_sizeof_sunpath=`cat conftestval`,
593 cv_mono_sizeof_sunpath=0,
594 cv_mono_sizeof_sunpath=0)])dnl
595 AC_MSG_RESULT($cv_mono_sizeof_sunpath)
596 AC_DEFINE_UNQUOTED(MONO_SIZEOF_SUNPATH, $cv_mono_sizeof_sunpath)
598 dnl *************************************
599 dnl *** Checks for zero length arrays ***
600 dnl *************************************
601 AC_MSG_CHECKING(whether $CC supports zero length arrays)
609 AC_DEFINE_UNQUOTED(MONO_ZERO_ARRAY_LENGTH, 0)
612 AC_DEFINE_UNQUOTED(MONO_ZERO_ARRAY_LENGTH, 1)
615 dnl *****************************
616 dnl *** Checks for libxnet ***
617 dnl *****************************
620 AC_MSG_CHECKING(for Solaris XPG4 support)
621 if test -f /usr/lib/libxnet.so; then
622 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
623 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
624 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED=1"
631 if test "$GCC" = "yes"; then
632 CFLAGS="$CFLAGS -Wno-char-subscripts"
637 dnl *****************************
638 dnl *** Checks for libpthread ***
639 dnl *****************************
640 AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread")
641 AC_CHECK_HEADERS(pthread.h)
642 AC_CHECK_FUNCS(pthread_mutex_timedlock)
643 AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np)
644 AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
645 AC_TRY_COMPILE([ #include <pthread.h>], [
646 pthread_mutexattr_t attr;
647 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
652 AC_MSG_WARN(Using mono_mutex_t for recursive mutexes)
653 AC_DEFINE(USE_MONO_MUTEX)
655 AC_CHECK_FUNCS(pthread_attr_setstacksize)
657 dnl ***********************************
658 dnl *** Checks for working __thread ***
659 dnl ***********************************
660 AC_MSG_CHECKING(for working __thread)
661 if test "x$with_nptl" != "xyes"; then
662 AC_MSG_RESULT(disabled)
668 static int res1, res2;
670 void thread_main (void *arg)
685 pthread_create (&t1, NULL, thread_main, 1);
686 pthread_create (&t2, NULL, thread_main, 2);
688 pthread_join (t1, NULL);
689 pthread_join (t2, NULL);
691 return !(res1 + res2 == 2);
695 AC_DEFINE(HAVE_KW_THREAD)
701 dnl **************************************
702 dnl *** Checks for working sigaltstack ***
703 dnl **************************************
704 AC_MSG_CHECKING(for working sigaltstack)
705 if test "x$with_sigaltstack" != "xyes"; then
706 AC_MSG_RESULT(disabled)
714 #include <sys/wait.h>
717 sigsegv_signal_handler (int _dummy, siginfo_t *info, void *context)
735 struct sigaltstack sas;
739 sa.sa_sigaction = sigsegv_signal_handler;
740 sigemptyset (&sa.sa_mask);
741 sa.sa_flags = SA_SIGINFO | SA_STACK;
742 if (sigaction (SIGSEGV, &sa, NULL) == -1) {
747 sas.ss_sp = malloc (SIGSTKSZ);
748 sas.ss_size = SIGSTKSZ;
749 sas.ss_flags = SS_ONSTACK;
750 if (sigaltstack (&sas, NULL) == -1) {
755 pthread_attr_init (&attr);
756 if (pthread_create(&id, &attr, loop, &attr) != 0) {
781 for (i = 0; i < 3; ++i) {
783 waitpid (son, &status, WNOHANG);
784 if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
794 AC_DEFINE(HAVE_WORKING_SIGALTSTACK)
801 dnl ********************************
802 dnl *** Checks for semaphore lib ***
803 dnl ********************************
804 # 'Real Time' functions on Solaris
805 # posix4 on Solaris 2.6
806 # pthread (first!) on Linux
807 AC_SEARCH_LIBS(sem_init, pthread rt posix4)
809 dnl ********************************
810 dnl *** Checks for timezone stuff **
811 dnl ********************************
812 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
818 ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
819 if test $ac_cv_struct_tm_gmtoff = yes; then
820 AC_DEFINE(HAVE_TM_GMTOFF)
822 AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
827 ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
828 if test $ac_cv_var_timezone = yes; then
829 AC_DEFINE(HAVE_TIMEZONE)
831 AC_ERROR(unable to find a way to determine timezone)
835 dnl *********************************
836 dnl *** Checks for math functions ***
837 dnl *********************************
839 AC_CHECK_FUNCS(finite, , AC_MSG_CHECKING(for finite in math.h)
840 AC_TRY_LINK([#include <math.h>],
842 AC_DEFINE(HAVE_FINITE) AC_MSG_RESULT(yes),
844 AC_CHECK_FUNCS(isfinite, , AC_MSG_CHECKING(for isfinite in math.h)
845 AC_TRY_LINK([#include <math.h>],
847 AC_DEFINE(HAVE_ISFINITE) AC_MSG_RESULT(yes),
850 dnl ****************************************************************
851 dnl *** Checks for working poll() (macosx defines it but doesn't ***
852 dnl *** have it in the library (duh)) ***
853 dnl ****************************************************************
856 dnl *************************
857 dnl *** Check for signbit ***
858 dnl *************************
859 AC_MSG_CHECKING(for signbit)
860 AC_TRY_LINK([#include <math.h>], [
861 int s = signbit(1.0);
864 AC_DEFINE(HAVE_SIGNBIT)
869 dnl *********************
870 dnl *** Check for AIO ***
871 dnl *********************
872 AC_MSG_CHECKING([for SIGEV_THREAD definition])
873 dnl Some systems (FreeBSD at least) may have aio_read
874 dnl but don't support/define SIGEV_THREAD.
876 #include <sys/signal.h>
878 int x = SIGEV_THREAD;
880 ac_cv_c_sigev_thread=yes
886 if test "$ac_cv_c_sigev_thread" = "yes" ; then
887 AC_CHECK_HEADERS(aio.h sys/aio.h)
888 AC_CHECK_LIB(rt, aio_read, [ LIBS="$LIBS -lrt" ],)
889 SIGVAL_PTR="undefined"
890 if test "$ac_cv_header_aio_h" = "yes" -o "$ac_cv_header_sys_aio_h" = "yes" ; then
891 AC_CHECK_MEMBER(union sigval.sigval_ptr,SIGVAL_PTR="sigval_ptr",, [
892 #include <sys/signal.h>
894 AC_CHECK_MEMBER(union sigval.sival_ptr,SIGVAL_PTR="sival_ptr",, [
895 #include <sys/signal.h>
897 if test "$SIGVAL_PTR" = "undefined" ; then
898 AC_MSG_ERROR([Unable to detect field name in 'union sigval'])
901 AC_DEFINE_UNQUOTED(SIGVAL_PTR,$SIGVAL_PTR,[Pointer field name in 'union sigval'])
905 AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
906 AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?))
910 AC_MSG_CHECKING(for socklen_t)
912 #include <sys/types.h>
913 #include <sys/socket.h>
917 ac_cv_c_socklen_t=yes
918 AC_DEFINE(HAVE_SOCKLEN_T)
924 AC_CHECK_FUNCS(trunc, , AC_MSG_CHECKING(for trunc in math.h)
925 AC_TRY_LINK([#include <math.h>],
928 AC_DEFINE(HAVE_TRUNC)
934 if test "x$ac_cv_truncl" != "xyes"; then
935 AC_CHECK_LIB(sunmath, aintl, [ AC_DEFINE(HAVE_AINTL) LIBS="$LIBS -lsunmath"])
938 dnl ****************************
939 dnl *** Look for /dev/random ***
940 dnl ****************************
942 AC_MSG_CHECKING([if usage of random device is requested])
943 AC_ARG_ENABLE(dev-random,
944 [ --disable-dev-random disable the use of the random device],
945 try_dev_random=$enableval, try_dev_random=yes)
946 AC_MSG_RESULT($try_dev_random)
950 NAME_DEV_RANDOM="/dev/srandom"
953 dnl Win32 does not have /dev/random, they have their own method...
955 *-*-mingw*|*-*-cygwin*)
956 ac_cv_have_dev_random=no
959 dnl Everywhere else, it's /dev/random
962 NAME_DEV_RANDOM="/dev/random"
966 AC_DEFINE_UNQUOTED(NAME_DEV_RANDOM, "$NAME_DEV_RANDOM")
968 dnl Now check if the device actually exists
970 if test "x$try_dev_random" = "xyes"; then
971 AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
972 [if test -r "$NAME_DEV_RANDOM" ; then
973 ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
974 if test "x$ac_cv_have_dev_random" = "xyes"; then
975 AC_DEFINE(HAVE_CRYPT_RNG)
978 AC_MSG_CHECKING(for random device)
979 ac_cv_have_dev_random=no
980 AC_MSG_RESULT(has been disabled)
983 if test "x$platform_win32" = "xyes"; then
984 AC_DEFINE(HAVE_CRYPT_RNG)
987 if test "x$ac_cv_have_dev_random" = "xno" \
988 && test "x$platform_win32" = "xno"; then
991 *** A system-provided entropy source was not found on this system.
992 *** Because of this, the System.Security.Cryptography random number generator
993 *** will throw a NotImplemented exception.
995 *** If you are seeing this message, and you know your system DOES have an
996 *** entropy collection in place, please contact <crichton@gimp.org> and
997 *** provide information about the system and how to access the random device.
999 *** Otherwise you can install either egd or prngd and set the environment
1000 *** variable MONO_EGD_SOCKET to point to the daemon's socket to use that.
1004 AC_MSG_CHECKING([if inter-process shared handles are requested])
1005 AC_ARG_ENABLE(shared-handles, [ --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=yes)
1006 AC_MSG_RESULT($try_shared_handles)
1007 if test "x$try_shared_handles" != "xyes"; then
1008 AC_DEFINE(DISABLE_SHARED_HANDLES)
1009 AC_SUBST(DISABLE_SHARED_HANDLES)
1020 AC_ARG_WITH(icu, [ --with-icu=yes/no],
1021 if test x$with_icu = xno; then
1023 AC_MSG_RESULT(Will not probe for ICU)
1028 AC_PATH_PROG(ICU_CONFIG, icu-config, no)
1029 if test "x$ICU_CONFIG" = "xno" -o ! -x "$ICU_CONFIG"; then
1030 AC_MSG_WARN([Only invariant locale available; install ICU for I18N support])
1031 enable_icu="no, if you want full i18n support download it from: http://oss.software.ibm.com/icu/index.html"
1033 enable_icu="yes. Version: `$ICU_CONFIG --version`"
1035 ICU_CFLAGS=`$ICU_CONFIG --cppflags`
1036 ICU_LIBS=`$ICU_CONFIG --ldflags`
1039 AC_SUBST(ICU_CFLAGS)
1043 ACCESS_UNALIGNED="yes"
1050 # mips-sgi-irix5.* | mips-sgi-irix6.*)
1052 # ACCESS_UNALIGNED="no"
1060 x86_64-*-* | amd64-*-*)
1069 ACCESS_UNALIGNED="no"
1073 # alpha*-*-linux* | alpha*-*-osf*)
1075 # ACCESS_UNALIGNED="no"
1077 # ia64-*-linux* | ia64-*-hpux*)
1081 # ACCESS_UNALIGNED="no";
1082 # case "$host_os" in
1083 # linux*) LIBC="libc.so.6.1";;
1084 # hpux*) LIBC="libc.so.1";;
1090 hppa2.0w-hp-hpux11.00 | hppa64-hp-hpux11.00)
1094 ACCESS_UNALIGNED="no"
1096 macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | \
1097 powerpc-*-sysv* | powerpc-*-darwin*)
1103 arm-*-linux-* | armv4l-*-linux-*)
1106 ACCESS_UNALIGNED="no"
1111 ACCESS_UNALIGNED="no"
1116 AC_ARG_WITH(jit, [ --with-jit=yes,no If you want to build scripts that default to the JIT],[
1121 if test x$JIT_SUPPORTED = xyes; then
1122 if $jit_wanted; then
1124 jit_status="Building and using the JIT"
1126 jit_status="Building the JIT, defaulting to the interpreter"
1129 jit_status="interpreter"
1132 AM_CONDITIONAL(USE_JIT, test x$USEJIT = xtrue)
1147 if test ${TARGET} = ARM; then
1148 dnl ******************************************
1149 dnl *** Check to see what FPU is available ***
1150 dnl ******************************************
1151 AC_MSG_CHECKING(which FPU to use)
1153 AC_TRY_COMPILE([], [
1154 __asm__ ("ldfd f0, [r0]");
1156 AC_TRY_COMPILE([], [
1157 __asm__ ("fldd d0, [r0]");
1158 ], fpu=VFP, fpu=NONE)
1162 CPPFLAGS="$CPPFLAGS -DARM_FPU_$fpu"
1166 if test ${TARGET} = unknown; then
1167 CPPFLAGS="$CPPFLAGS -DNO_PORT"
1168 AC_MSG_WARN("mono has not been ported to $host: some things may not work.")
1171 if test ${ACCESS_UNALIGNED} = no; then
1172 CPPFLAGS="$CPPFLAGS -DNO_UNALIGNED_ACCESS"
1176 AC_ARG_WITH(preview, [ --with-preview=yes,no If you want to install the 2.0 FX preview],[
1177 if test x$with_preview = xyes; then
1182 AM_CONDITIONAL(INSTALL_2_0, test x$PREVIEW = xyes)
1184 AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
1185 AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
1186 AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
1187 AM_CONDITIONAL(X86, test x$TARGET = xX86)
1188 AM_CONDITIONAL(AMD64, test x$TARGET = xAMD64)
1189 AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
1190 AM_CONDITIONAL(IA64, test x$TARGET = xIA64)
1191 AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
1192 AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
1193 AM_CONDITIONAL(ARM, test x$TARGET = xARM)
1194 AM_CONDITIONAL(S390, test x$TARGET = xS390)
1195 AM_CONDITIONAL(HPPA, test x$TARGET = xHPPA)
1197 AM_CONDITIONAL(JIT_SUPPORTED, test x$JIT_SUPPORTED = xyes)
1201 AC_SUBST(arch_target)
1212 mono/metadata/Makefile
1217 mono/os/win32/Makefile
1218 mono/os/unix/Makefile
1219 mono/arch/x86/Makefile
1220 mono/arch/amd64/Makefile
1221 mono/arch/hppa/Makefile
1222 mono/arch/ppc/Makefile
1223 mono/arch/sparc/Makefile
1224 mono/arch/s390/Makefile
1225 mono/arch/arm/Makefile
1226 mono/arch/alpha/Makefile
1227 mono/interpreter/Makefile
1229 mono/tests/tests-config
1230 mono/benchmark/Makefile
1231 mono/monoburg/Makefile
1232 mono/monograph/Makefile
1233 mono/io-layer/Makefile
1234 mono/handles/Makefile
1236 mono/profiler/Makefile
1239 runtime/net_1_1/Makefile
1240 runtime/net_2_0/Makefile
1251 tools/locale-builder/Makefile
1259 SIGALTSTACK: $with_sigaltstack
1262 JNI support: $jdk_headers_found