diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2004-05-04 16:04:03 +0400 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2004-05-04 16:04:03 +0400 |
commit | af9bb14dd7beb6ae9f4db9e361255b872b79cc72 (patch) | |
tree | 531cfdeb1676e6f92989a8b5450a6161d8208925 | |
parent | bf3f31ae02ccf6eafa4599501af3265dfe6425ae (diff) |
2004-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* configure.in: check for SIGEV_THREAD being defined before checking
for AIO support. Fixes compilation under FreeBSD.
svn path=/trunk/mono/; revision=26690
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.in | 42 |
2 files changed, 34 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog index 0b9315256bc..9be83113f85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * configure.in: check for SIGEV_THREAD being defined before checking + for AIO support. Fixes compilation under FreeBSD. + 2004-05-04 Raja R Harinath <rharinath@novell.com> * runtime/net_1_1/Makefile.am (mono_runtime): Use USE_JIT, not diff --git a/configure.in b/configure.in index f0fad45e37c..f014ec3c8ed 100644 --- a/configure.in +++ b/configure.in @@ -857,21 +857,37 @@ if test x$platform_win32 = xno; then dnl ********************* dnl *** Check for AIO *** dnl ********************* - AC_CHECK_HEADERS(aio.h sys/aio.h) - AC_CHECK_LIB(rt, aio_read, [ LIBS="$LIBS -lrt" ],) - SIGVAL_PTR="undefined" - if test "$ac_cv_header_aio_h" = "yes" -o "$ac_cv_header_sys_aio_h" = "yes" ; then - AC_CHECK_MEMBER(union sigval.sigval_ptr,SIGVAL_PTR="sigval_ptr",, [ - #include <sys/signal.h> - ]) - AC_CHECK_MEMBER(union sigval.sival_ptr,SIGVAL_PTR="sival_ptr",, [ - #include <sys/signal.h> - ]) - if test "$SIGVAL_PTR" = "undefined" ; then - AC_MSG_ERROR([Unable to detect field name in 'union sigval']) + AC_MSG_CHECKING([for SIGEV_THREAD definition]) + dnl Some systems (FreeBSD at least) may have aio_read + dnl but don't support/define SIGEV_THREAD. + AC_TRY_COMPILE([ + #include <sys/signal.h> + ],[ + int x = SIGEV_THREAD; + ],[ + ac_cv_c_sigev_thread=yes + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + ]) + + if test "$ac_cv_c_sigev_thread" = "yes" ; then + AC_CHECK_HEADERS(aio.h sys/aio.h) + AC_CHECK_LIB(rt, aio_read, [ LIBS="$LIBS -lrt" ],) + SIGVAL_PTR="undefined" + if test "$ac_cv_header_aio_h" = "yes" -o "$ac_cv_header_sys_aio_h" = "yes" ; then + AC_CHECK_MEMBER(union sigval.sigval_ptr,SIGVAL_PTR="sigval_ptr",, [ + #include <sys/signal.h> + ]) + AC_CHECK_MEMBER(union sigval.sival_ptr,SIGVAL_PTR="sival_ptr",, [ + #include <sys/signal.h> + ]) + if test "$SIGVAL_PTR" = "undefined" ; then + AC_MSG_ERROR([Unable to detect field name in 'union sigval']) + fi fi + AC_DEFINE_UNQUOTED(SIGVAL_PTR,$SIGVAL_PTR,[Pointer field name in 'union sigval']) fi - AC_DEFINE_UNQUOTED(SIGVAL_PTR,$SIGVAL_PTR,[Pointer field name in 'union sigval']) else AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?)) AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?)) |