* write the session pointer to a pipe which the event engine monitors.
*/
+#undef ACCEPTOR_USE_KQUEUE
#undef ACCEPTOR_USE_POLL
-#define ACCEPTOR_USE_KQUEUE
+
+#if defined(HAVE_KQUEUE)
+#define ACCEPTOR_USE_KQUEUE 1
+#elif defined(HAVE_POLL)
+#define ACCEPTOR_USE_POLL 1
+#else
+#error No usable acceptors detected.
+#endif
#include <stdio.h>
#include <errno.h>
/*====================================================================*/
#ifdef ACCEPTOR_USE_POLL
-#include <poll.h>
+#include <sys/poll.h>
static struct pollfd *pollfd;
static unsigned npoll;
#endif /* ACCEPTOR_USE_POLL */
/*====================================================================*/
#ifdef ACCEPTOR_USE_KQUEUE
+
#include <sys/event.h>
static int kq = -1;
AC_CHECK_LIB(rt, clock_gettime, need_librt=yes)
AM_CONDITIONAL(NEED_LIBRT, test x$need_librt = xyes)
+# Check for the presence of RSA's MD5 implementation (libmd on *BSD)
AC_CHECK_HEADERS([md5.h])
if test x$ac_cv_header_md5_h = xyes ; then
AC_CHECK_LIB(md, MD5Init, need_libmd=yes)
fi
AM_CONDITIONAL(NEED_LIBMD, test x$need_libmd = xyes)
+# Check which mechanism to use for the acceptor
+AC_CHECK_FUNCS([kqueue])
+AC_CHECK_FUNCS([poll])
+
AC_CONFIG_FILES([
Makefile
bin/Makefile