From: Eric Wong <normalperson@yhbt.net>
To: sleepy.penguin@librelist.org
Subject: [sleepy.penguin] [PATCH] extconf: avoid unnecessary linkage against libkqueue
Date: Fri, 27 Dec 2013 23:13:54 +0000 [thread overview]
Message-ID: <20131227231354.GA22041@dcvr.yhbt.net> (raw)
In-Reply-To: <20131227231354.GA22041@dcvr.yhbt.net>
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
parent reply other threads:[~2013-12-27 23:14 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20131227231354.GA22041@dcvr.yhbt.net>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/sleepy_penguin/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131227231354.GA22041@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=sleepy.penguin@librelist.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).