[Libevent-users] libevent and autotools
Nick Mathewson
nickm at freehaven.net
Wed Apr 23 00:38:07 EDT 2008
On Tue, Apr 22, 2008 at 11:00:29PM -0300, Daniel Morales wrote:
> Hi all,
>
> Since libevent doesn't have a *.pc file to use with pkg-config, i need to
> add some manual check to a configure.in.
Hm! pkg-config! Yes, that's a good idea; we should support that in
libevent 2.0 and later. Would you like to write a patch to
libevent to add pkg-config support?
> Any example for libevent to share? :)
You could just search for a header called event.h that defines
event_init, and flags like -levent-core that defines event_init.
If you want to abuse autoconf and look in a bunch of likely places for
the headers and libraries, you could try to see what Tor does, but I'm
afraid it's a little baroque. Look in
https://www.torproject.org/svn/trunk/configure.in
for mention of libevent, and in
https://www.torproject.org/svn/trunk/acinclude.m4
for a definition of the TOR_SEARCH_LIBRARY macro.
(Yes, this is an ugly and underdocumented hack. Sorry. All of it
seemed important at the time.)
More information about the Libevent-users
mailing list