Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-05-04 16:04:03 +0400
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-05-04 16:04:03 +0400
commitaf9bb14dd7beb6ae9f4db9e361255b872b79cc72 (patch)
tree531cfdeb1676e6f92989a8b5450a6161d8208925 /configure.in
parentbf3f31ae02ccf6eafa4599501af3265dfe6425ae (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
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in42
1 files changed, 29 insertions, 13 deletions
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?))