diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-12-27 23:09:24 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-12-27 23:09:24 +0000 |
commit | 117a81eddb1375dd1d08d7e7b57c585354dd2d90 (patch) | |
tree | a8cb6c138661310356196219c3af3b4a83d61bfd | |
parent | 45ce6646ab7cc62ad30ec0bf9c68719f9c467866 (diff) | |
download | sleepy_penguin-117a81eddb1375dd1d08d7e7b57c585354dd2d90.tar.gz |
The check for libkqueue may succeed out-of-the-box on Debian systems where libkqueue-dev is installed. However, libkqueue-dev on Debian installs sys/event.h in a non-standard include path (/usr/include/kqueue), so it is not picked up by default and kqueue support is never compiled. So only check for (and link to) libkqueue if we are configured to detect sys/event.h. This should not affect users on *BSD platforms with native kqueue support.
-rw-r--r-- | ext/sleepy_penguin/extconf.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/sleepy_penguin/extconf.rb b/ext/sleepy_penguin/extconf.rb index 3a6152b..407c947 100644 --- a/ext/sleepy_penguin/extconf.rb +++ b/ext/sleepy_penguin/extconf.rb @@ -1,8 +1,9 @@ require 'mkmf' have_header('sys/epoll.h') dir_config('kqueue') -have_library('kqueue') -have_header('sys/event.h') +if have_header('sys/event.h') + have_library('kqueue') +end have_header('sys/mount.h') have_header('sys/eventfd.h') |