2010-03-12 14:37:54 -05:00
|
|
|
# 'foreign' means that we're not enforcing GNU package rules strictly.
|
|
|
|
# '1.7' means that we need automake 1.7 or later (and we do).
|
|
|
|
AUTOMAKE_OPTIONS = foreign 1.7
|
|
|
|
|
2009-01-22 02:47:35 +00:00
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
2002-04-09 17:02:38 +00:00
|
|
|
|
2010-06-19 18:23:16 -04:00
|
|
|
# This is the "Release" of the Libevent ABI. It takes precedence over
|
|
|
|
# the VERSION_INFO, so that two versions of Libevent with the same
|
|
|
|
# "Release" are never binary-compatible.
|
|
|
|
#
|
|
|
|
# This number incremented once for the 2.0 release candidate, and
|
|
|
|
# shouldn't increment again until Libevent 3.0. Also, we shouldn't
|
|
|
|
# increment to Libevent 3.0 unless we know in advance we're breaking
|
|
|
|
# the ABI.
|
|
|
|
#
|
|
|
|
#RELEASE = -release 2.0
|
|
|
|
RELEASE =
|
|
|
|
|
2007-11-04 02:21:31 +00:00
|
|
|
# This is the version info for the libevent binary API. It has three
|
|
|
|
# numbers:
|
|
|
|
# Current -- the number of the binary API that we're implementing
|
|
|
|
# Revision -- which iteration of the implementation of the binary
|
|
|
|
# API are we supplying?
|
|
|
|
# Age -- How many previous binary API versions do we also
|
|
|
|
# support?
|
|
|
|
#
|
2010-06-19 18:23:16 -04:00
|
|
|
# To increment a VERSION_INFO (current:revision:age):
|
|
|
|
# If the ABI didn't change:
|
|
|
|
# Return (current:revision+1:age)
|
|
|
|
# If the ABI changed, but it's backward-compatible:
|
|
|
|
# Return (current+1:0:age+1)
|
|
|
|
# If the ABI changed and it isn't backward-compatible:
|
|
|
|
# Return (current+1:0:0)
|
2007-11-04 02:21:31 +00:00
|
|
|
#
|
2010-06-19 18:23:16 -04:00
|
|
|
# Once an RC is out, DO NOT MAKE ANY ABI-BREAKING CHANGES IN THAT SERIES.
|
|
|
|
VERSION_INFO = 4:0:0
|
|
|
|
|
|
|
|
# History: RELEASE VERSION_INFO
|
|
|
|
# 2.0.1-alpha -- 2.0 1:0:0
|
|
|
|
# 2.0.2-alpha -- 2:0:0
|
|
|
|
# 2.0.3-alpha -- 2:0:0 (should have incremented; didn't.)
|
|
|
|
# 2.0.4-alpha -- 3:0:0
|
|
|
|
# 2.0.5-beta -- 4:0:0
|
|
|
|
# Planned:
|
|
|
|
# 2.0.6-rc -- 2.0 2:0:0
|
|
|
|
# 2.0.7-stable -- 2.0 2:1:0 (Assuming no ABI change)
|
2007-11-04 02:21:31 +00:00
|
|
|
#
|
2010-06-19 18:23:16 -04:00
|
|
|
# If Libevent 2.1.1 makes 'struct event' etc opaque in the headers:
|
|
|
|
# 2.1.1-alpha -- 2.x 1:0:0
|
|
|
|
# If Libevent 2.1.1 does not makes 'struct event' opaque in the headers:
|
|
|
|
# 2.1.1-alpha -- 2.1 1:0:0
|
|
|
|
|
|
|
|
# ABI version history for this package effectively restarts every time
|
|
|
|
# we change RELEASE. Version 1.4.x had RELEASE of 1.4.
|
2009-04-17 17:22:32 +00:00
|
|
|
#
|
2010-06-19 18:23:16 -04:00
|
|
|
# Ideally, we would not be using RELEASE at all; instead we could just
|
|
|
|
# use the VERSION_INFO field to label our backward-incompatible ABI
|
|
|
|
# changes, and those would be few and far between. Unfortunately,
|
|
|
|
# Libevent still exposes far too many volatile structures in its
|
|
|
|
# headers, so we pretty much have to assume that most development
|
|
|
|
# series will break ABI compatibility. For now, it's simplest just to
|
|
|
|
# keep incrementing the RELEASE between series and resetting VERSION_INFO.
|
2009-04-17 17:22:32 +00:00
|
|
|
#
|
2010-06-19 18:23:16 -04:00
|
|
|
# Eventually, when we get to the point where the structures in the
|
|
|
|
# headers are all non-changing (or not there at all!), we can shift to
|
|
|
|
# a more normal worldview where backward-incompatible ABI changes are
|
|
|
|
# nice and rare. For the next couple of years, though, 'struct event'
|
|
|
|
# is user-visible, and so we can pretty much guarantee that release
|
|
|
|
# series won't be binary-compatible.
|
2007-11-04 02:21:31 +00:00
|
|
|
|
2010-03-22 13:27:47 -04:00
|
|
|
dist_bin_SCRIPTS = event_rpcgen.py
|
2005-08-22 01:34:34 +00:00
|
|
|
|
2009-04-17 00:24:58 +00:00
|
|
|
pkgconfigdir=$(libdir)/pkgconfig
|
|
|
|
pkgconfig_DATA=libevent.pc
|
|
|
|
|
2010-03-12 14:16:30 -05:00
|
|
|
# These sources are conditionally added by configure.in or conditionally
|
|
|
|
# included from other files.
|
2010-03-12 13:22:47 -05:00
|
|
|
PLATFORM_DEPENDENT_SRC = \
|
2010-03-12 14:16:30 -05:00
|
|
|
epoll_sub.c \
|
|
|
|
arc4random.c
|
2010-03-12 13:22:47 -05:00
|
|
|
|
2009-01-13 19:20:14 +00:00
|
|
|
EXTRA_DIST = \
|
2010-01-19 13:55:53 -05:00
|
|
|
LICENSE \
|
2010-03-12 14:16:30 -05:00
|
|
|
autogen.sh \
|
2010-03-01 22:06:12 -05:00
|
|
|
libevent.pc.in \
|
2009-03-12 17:43:43 +00:00
|
|
|
Doxyfile \
|
2009-04-17 06:56:23 +00:00
|
|
|
whatsnew-2.0.txt \
|
2010-03-12 13:22:47 -05:00
|
|
|
Makefile.nmake test/Makefile.nmake \
|
|
|
|
$(PLATFORM_DEPENDENT_SRC)
|
2002-04-09 17:02:38 +00:00
|
|
|
|
2007-11-03 23:45:38 +00:00
|
|
|
lib_LTLIBRARIES = libevent.la libevent_core.la libevent_extra.la
|
2009-01-21 07:51:25 +00:00
|
|
|
if PTHREADS
|
|
|
|
lib_LTLIBRARIES += libevent_pthreads.la
|
2010-08-10 11:11:25 -04:00
|
|
|
pkgconfig_DATA += libevent_pthreads.pc
|
2009-01-21 07:51:25 +00:00
|
|
|
endif
|
2009-07-28 04:03:57 +00:00
|
|
|
if OPENSSL
|
|
|
|
lib_LTLIBRARIES += libevent_openssl.la
|
2010-08-10 11:11:25 -04:00
|
|
|
pkgconfig_DATA += libevent_openssl.pc
|
2009-07-28 04:03:57 +00:00
|
|
|
endif
|
2002-04-09 17:02:38 +00:00
|
|
|
|
2008-02-28 02:47:43 +00:00
|
|
|
SUBDIRS = . include sample test
|
2007-12-06 19:35:55 +00:00
|
|
|
|
2006-09-27 03:07:38 +00:00
|
|
|
if BUILD_WIN32
|
|
|
|
|
|
|
|
SYS_LIBS = -lws2_32
|
2009-11-05 18:49:08 +00:00
|
|
|
SYS_SRC = win32select.c evthread_win32.c buffer_iocp.c event_iocp.c \
|
2009-05-05 16:52:37 +00:00
|
|
|
bufferevent_async.c
|
2006-09-27 03:07:38 +00:00
|
|
|
SYS_INCLUDES = -IWIN32-Code
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
SYS_LIBS =
|
|
|
|
SYS_SRC =
|
|
|
|
SYS_INCLUDES =
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2010-03-12 14:16:30 -05:00
|
|
|
if SELECT_BACKEND
|
|
|
|
SYS_SRC += select.c
|
|
|
|
endif
|
|
|
|
if POLL_BACKEND
|
|
|
|
SYS_SRC += poll.c
|
|
|
|
endif
|
|
|
|
if DEVPOLL_BACKEND
|
|
|
|
SYS_SRC += devpoll.c
|
|
|
|
endif
|
|
|
|
if KQUEUE_BACKEND
|
|
|
|
SYS_SRC += kqueue.c
|
|
|
|
endif
|
|
|
|
if EPOLL_BACKEND
|
|
|
|
SYS_SRC += epoll.c
|
|
|
|
endif
|
|
|
|
if EVPORT_BACKEND
|
|
|
|
SYS_SRC += evport.c
|
|
|
|
endif
|
|
|
|
if SIGNAL_SUPPORT
|
|
|
|
SYS_SRC += signal.c
|
|
|
|
endif
|
|
|
|
|
2007-11-07 06:01:57 +00:00
|
|
|
BUILT_SOURCES = event-config.h
|
|
|
|
|
|
|
|
event-config.h: config.h
|
|
|
|
echo '/* event-config.h' > $@
|
2009-04-17 06:55:08 +00:00
|
|
|
echo ' *' >> $@
|
|
|
|
echo ' * This file was generated by autoconf when libevent was built, and post-' >> $@
|
|
|
|
echo ' * processed by Libevent so that its macros would have a uniform prefix.' >> $@
|
|
|
|
echo ' *' >> $@
|
|
|
|
echo ' * DO NOT EDIT THIS FILE.' >> $@
|
|
|
|
echo ' *' >> $@
|
2007-11-07 06:01:57 +00:00
|
|
|
echo ' * Do not rely on macros in this file existing in later versions.'>> $@
|
|
|
|
echo ' */' >> $@
|
|
|
|
echo '#ifndef _EVENT_CONFIG_H_' >> $@
|
|
|
|
echo '#define _EVENT_CONFIG_H_' >> $@
|
|
|
|
|
|
|
|
sed -e 's/#define /#define _EVENT_/' \
|
|
|
|
-e 's/#undef /#undef _EVENT_/' \
|
|
|
|
-e 's/#ifndef /#ifndef _EVENT_/' < config.h >> $@
|
|
|
|
echo "#endif" >> $@
|
|
|
|
|
2009-11-27 15:20:43 -05:00
|
|
|
CORE_SRC = event.c evthread.c buffer.c \
|
2009-02-02 19:22:13 +00:00
|
|
|
bufferevent.c bufferevent_sock.c bufferevent_filter.c \
|
2009-11-27 13:16:54 -05:00
|
|
|
bufferevent_pair.c listener.c bufferevent_ratelim.c \
|
2010-02-10 17:19:18 -05:00
|
|
|
evmap.c log.c evutil.c evutil_rand.c strlcpy.c $(SYS_SRC)
|
2009-11-16 22:25:46 +00:00
|
|
|
EXTRA_SRC = event_tagging.c http.c evdns.c evrpc.c
|
2009-01-13 19:19:50 +00:00
|
|
|
|
2010-05-06 14:37:23 -04:00
|
|
|
if BUILD_WIN32
|
|
|
|
NO_UNDEFINED = -no-undefined
|
2010-05-06 14:37:23 -04:00
|
|
|
MAYBE_CORE = libevent_core.la
|
2010-05-06 14:37:23 -04:00
|
|
|
else
|
|
|
|
NO_UNDEFINED =
|
2010-06-23 01:15:15 +02:00
|
|
|
MAYBE_CORE =
|
2010-05-06 14:37:23 -04:00
|
|
|
endif
|
|
|
|
|
2010-06-19 18:22:48 -04:00
|
|
|
GENERIC_LDFLAGS = -version-info $(VERSION_INFO) $(RELEASE) $(NO_UNDEFINED)
|
|
|
|
|
2007-11-03 23:45:38 +00:00
|
|
|
libevent_la_SOURCES = $(CORE_SRC) $(EXTRA_SRC)
|
2006-09-27 03:07:38 +00:00
|
|
|
libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
|
2010-06-19 18:22:48 -04:00
|
|
|
libevent_la_LDFLAGS = $(GENERIC_LDFLAGS)
|
2002-04-09 17:02:38 +00:00
|
|
|
|
2007-11-03 23:45:38 +00:00
|
|
|
libevent_core_la_SOURCES = $(CORE_SRC)
|
|
|
|
libevent_core_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
|
2010-06-19 18:22:48 -04:00
|
|
|
libevent_core_la_LDFLAGS = $(GENERIC_LDFLAGS)
|
2007-11-03 23:45:38 +00:00
|
|
|
|
2009-01-21 07:51:25 +00:00
|
|
|
if PTHREADS
|
|
|
|
libevent_pthreads_la_SOURCES = evthread_pthread.c
|
2010-06-19 18:22:48 -04:00
|
|
|
libevent_pthreads_la_LDFLAGS = $(GENERIC_LDFLAGS)
|
2009-01-21 07:51:25 +00:00
|
|
|
endif
|
|
|
|
|
2007-11-03 23:45:38 +00:00
|
|
|
libevent_extra_la_SOURCES = $(EXTRA_SRC)
|
2010-05-06 14:37:23 -04:00
|
|
|
libevent_extra_la_LIBADD = $(MAYBE_CORE) $(SYS_LIBS)
|
2010-06-19 18:22:48 -04:00
|
|
|
libevent_extra_la_LDFLAGS = $(GENERIC_LDFLAGS)
|
2007-11-03 23:45:38 +00:00
|
|
|
|
2009-07-28 04:03:57 +00:00
|
|
|
if OPENSSL
|
|
|
|
libevent_openssl_la_SOURCES = bufferevent_openssl.c
|
2010-05-06 14:37:23 -04:00
|
|
|
libevent_openssl_la_LIBADD = $(MAYBE_CORE) -lcrypto -lssl
|
2010-06-19 18:22:48 -04:00
|
|
|
libevent_openssl_la_LDFLAGS = $(GENERIC_LDFLAGS)
|
2009-07-28 04:03:57 +00:00
|
|
|
endif
|
|
|
|
|
2009-01-13 19:20:14 +00:00
|
|
|
noinst_HEADERS = util-internal.h mm-internal.h ipv6-internal.h \
|
|
|
|
evrpc-internal.h strlcpy-internal.h evbuffer-internal.h \
|
|
|
|
bufferevent-internal.h http-internal.h event-internal.h \
|
2009-04-19 13:33:52 +00:00
|
|
|
evthread-internal.h ht-internal.h defer-internal.h \
|
2009-11-27 13:16:54 -05:00
|
|
|
minheap-internal.h log-internal.h evsignal-internal.h evmap-internal.h \
|
2010-03-12 13:22:47 -05:00
|
|
|
changelist-internal.h iocp-internal.h \
|
|
|
|
ratelim-internal.h \
|
|
|
|
WIN32-Code/event-config.h \
|
|
|
|
WIN32-Code/tree.h \
|
|
|
|
compat/sys/queue.h
|
2009-01-13 19:20:14 +00:00
|
|
|
|
2009-05-15 01:38:23 +00:00
|
|
|
include_HEADERS = event.h evhttp.h evdns.h evrpc.h evutil.h
|
|
|
|
|
|
|
|
nodist_include_HEADERS = event-config.h
|
2002-04-09 17:02:38 +00:00
|
|
|
|
2008-02-28 02:47:43 +00:00
|
|
|
INCLUDES = -I$(srcdir)/compat -I$(srcdir)/include $(SYS_INCLUDES)
|
2002-04-09 19:09:32 +00:00
|
|
|
|
2010-03-12 13:09:28 -05:00
|
|
|
verify: check
|
2004-12-01 19:59:00 +00:00
|
|
|
|
2007-09-18 15:16:23 +00:00
|
|
|
doxygen: FORCE
|
2007-09-18 15:12:09 +00:00
|
|
|
doxygen $(srcdir)/Doxyfile
|
2007-09-18 15:16:23 +00:00
|
|
|
FORCE:
|
2007-09-18 15:12:09 +00:00
|
|
|
|
2009-04-17 00:24:58 +00:00
|
|
|
DISTCLEANFILES = *~ event-config.h libevent.pc
|