aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-06-27 21:51:54 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-06-27 21:51:54 +0000
commita7b99fc46339d0c3e1f2c095df371a7c88ed7907 (patch)
treea36bf361acab8182f6f964e2c4d99628872bce1f /configure.ac
parent6f252f470470698ff08cffc23daa7276bbc8d327 (diff)
check for a fine poll() before it is used to sleep subsecond
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac25
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 63aa48493..29d31bd47 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1201,6 +1201,31 @@ if test "$ac_cv_func_sigsetjmp" != "yes"; then
)
fi
+dnl poll() might be badly emulated, as in Mac OS X 10.3 (and other BSDs?) and
+dnl to find out we make an extra check here!
+if test "$ac_cv_func_poll" = "yes"; then
+ AC_MSG_CHECKING([if poll works with NULL inputs])
+ AC_RUN_IFELSE([
+#ifdef HAVE_SYS_POLL_H
+#include <sys/poll.h>
+#endif
+
+ int main(void)
+ {
+ /* make this return 0 == timeout since there's nothing to read from */
+ return poll((void *)0, 0, 10 /*ms*/);
+ }
+],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_POLL_FINE, 1, [If you have a fine poll]),
+ AC_MSG_RESULT(no),
+ AC_MSG_RESULT(cross-compiling assumes yes)
+ AC_DEFINE(HAVE_POLL_FINE, 1, [If you have a fine poll])
+ ) dnl end of AC_RUN_IFELSE
+fi
+
+
+
AC_PATH_PROG( PERL, perl, ,
$PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
AC_SUBST(PERL)