Commit 18fb5d00 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

detect problematic implementation of kqueue EV_SET to avoid the use of it with ASIO

git-svn-id: svn:// e5f2f494-b856-4b98-b285-d166d9295462
parent 737c49cf
......@@ -310,8 +310,35 @@ AC_SUBST(GTEST_LDADD)
PKG_CHECK_MODULES(SQLITE, sqlite3 >= 3.3.9, enable_features="$enable_features SQLite3")
# ASIO: we extensively use it as the C++ event management module.
# Use local ASIO headers from ext
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/ext/asio"
# kqueue portability: ASIO uses kqueue by default if it's available (it's
# generally available in BSD variants). Unfortunately, some public
# implementation of kqueue forces a conversion from a pointer to an integer,
# which is prohibited in C++ unless reinterpret_cast, C++'s most evil beast
# (and ASIO doesn't use it anyway) is used. This will cause build error for
# some of our C++ files including ASIO header files. The following check
# detects such cases and tells ASIO not to use kqueue if so.
AC_CHECK_FUNC(kqueue, ac_cv_have_kqueue=yes, ac_cv_have_kqueue=no)
case $ac_cv_have_kqueue in
AC_MSG_CHECKING([whether kqueue EV_SET compiles in C++])
#include <sys/types.h>
#include <sys/param.h>
#include <sys/event.h>],
[char* udata;
EV_SET(NULL, 0, 0, 0, 0, 0, udata);],
[AC_MSG_RESULT([no, disable kqueue for ASIO])
# Check for headers from required devel kits.
# boost/shared_ptr.hpp is in ext in svn but not in tarball.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment