[libdispatch-dev] [PATCH] use libkqueue if sys/event.h is missing

Robert Watson robert at fledge.watson.org
Sun Nov 15 15:34:57 PST 2009


On Sun, 15 Nov 2009, Mark Heily wrote:

>>> Attached is a patch that uses pkg-config(1) to determine the installed 
>>> location of libkqueue and set the appropriate Makefile variables. I'm not 
>>> 100% sure the LIBADD and LDFLAGS variables are correct, but I can't test 
>>> it until libdispatch compiles cleanly on Linux.
>> 
>> Is there a reason not to use PKG_CHECK_MODULES(), which will define _LIBS 
>> and _FLAGS variables automatically?  This would avoid encoding the use of 
>> pkg-config in the makefiles, limiting it to a configuration-time step.
>
> No reason, other than that my initial attempts to use PKG_CHECK_MODULES() 
> were unsuccessful. I think I figured out it out now. The following patch has 
> been tested on Linux and FreeBSD 8-STABLE and seems to work.

Much better you having to figure out pkg-config than me, although I suspect 
we'll want to allow libdispatch to advertise its services with pkg-config as 
well soon enough.  I've committed this patch, with minor comment tweaks (to 
document predence more clearly) as r162, thanks!

Robert N M Watson
Computer Laboratory
University of Cambridge



More information about the libdispatch-dev mailing list