* [sleepy.penguin] [PATCH] extconf: avoid unnecessary linkage against libkqueue
@ 2013-12-27 23:13 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2013-12-27 23:13 UTC (permalink / raw)
To: sleepy.penguin
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.
---
ext/sleepy_penguin/extconf.rb | 5 +++--
1 file 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')
--
EW
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-27 23:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-27 23:13 [sleepy.penguin] [PATCH] extconf: avoid unnecessary linkage against libkqueue Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/sleepy_penguin.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).