]> arthur.barton.de Git - netatalk.git/blob - libevent/Makefile.am
Apply patch after importing new version
[netatalk.git] / libevent / Makefile.am
1 # 'foreign' means that we're not enforcing GNU package rules strictly.
2 # '1.7' means that we need automake 1.7 or later (and we do).
3 AUTOMAKE_OPTIONS = foreign 1.7
4
5 ACLOCAL_AMFLAGS = -I m4
6
7 # This is the "Release" of the Libevent ABI.  It takes precedence over
8 # the VERSION_INFO, so that two versions of Libevent with the same
9 # "Release" are never binary-compatible.
10 #
11 # This number incremented once for the 2.0 release candidate, and
12 # will increment for each series until we revise our interfaces enough
13 # that we can seriously expect ABI compatibility between series.
14 #
15 RELEASE = -release 2.0
16
17 # This is the version info for the libevent binary API.  It has three
18 # numbers:
19 #   Current  -- the number of the binary API that we're implementing
20 #   Revision -- which iteration of the implementation of the binary
21 #               API are we supplying?
22 #   Age      -- How many previous binary API versions do we also
23 #               support?
24 #
25 # To increment a VERSION_INFO (current:revision:age):
26 #    If the ABI didn't change:
27 #        Return (current:revision+1:age)
28 #    If the ABI changed, but it's backward-compatible:
29 #        Return (current+1:0:age+1)
30 #    If the ABI changed and it isn't backward-compatible:
31 #        Return (current+1:0:0)
32 #
33 # Once an RC is out, DO NOT MAKE ANY ABI-BREAKING CHANGES IN THAT SERIES
34 # UNLESS YOU REALLY REALLY HAVE TO.
35 VERSION_INFO = 6:1:1
36
37 # History:          RELEASE    VERSION_INFO
38 #  2.0.1-alpha --     2.0        1:0:0
39 #  2.0.2-alpha --                2:0:0
40 #  2.0.3-alpha --                2:0:0  (should have incremented; didn't.)
41 #  2.0.4-alpha --                3:0:0
42 #  2.0.5-beta  --                4:0:0
43 #  2.0.6-rc    --     2.0        2:0:0
44 #  2.0.7-rc    --     2.0        3:0:1
45 #  2.0.8-rc    --     2.0        4:0:2
46 #  2.0.9-rc    --     2.0        5:0:0 (ABI changed slightly)
47 #  2.0.10-stable--    2.0        5:1:0 (No ABI change)
48 #  2.0.11-stable--    2.0        6:0:1 (ABI changed, backward-compatible)
49 #  2.0.12-stable--    2.0        6:1:1 (No ABI change)
50 #
51 # For Libevent 2.1:
52 #  2.1.1-alpha --     2.1        1:0:0
53
54
55 # ABI version history for this package effectively restarts every time
56 # we change RELEASE.  Version 1.4.x had RELEASE of 1.4.
57 #
58 # Ideally, we would not be using RELEASE at all; instead we could just
59 # use the VERSION_INFO field to label our backward-incompatible ABI
60 # changes, and those would be few and far between.  Unfortunately,
61 # Libevent still exposes far too many volatile structures in its
62 # headers, so we pretty much have to assume that most development
63 # series will break ABI compatibility.  For now, it's simplest just to
64 # keep incrementing the RELEASE between series and resetting VERSION_INFO.
65 #
66 # Eventually, when we get to the point where the structures in the
67 # headers are all non-changing (or not there at all!), we can shift to
68 # a more normal worldview where backward-incompatible ABI changes are
69 # nice and rare.  For the next couple of years, though, 'struct event'
70 # is user-visible, and so we can pretty much guarantee that release
71 # series won't be binary-compatible.
72
73 dist_bin_SCRIPTS = event_rpcgen.py
74
75 pkgconfigdir=$(libdir)/pkgconfig
76 LIBEVENT_PKGCONFIG=libevent.pc
77
78 # These sources are conditionally added by configure.in or conditionally
79 # included from other files.
80 PLATFORM_DEPENDENT_SRC = \
81         epoll_sub.c \
82         arc4random.c
83
84 EXTRA_DIST = \
85         LICENSE \
86         autogen.sh \
87         libevent.pc.in \
88         Doxyfile \
89         whatsnew-2.0.txt \
90         Makefile.nmake test/Makefile.nmake \
91         $(PLATFORM_DEPENDENT_SRC)
92
93 LIBEVENT_LIBS_LA = libevent.la libevent_core.la libevent_extra.la
94 if PTHREADS
95 LIBEVENT_LIBS_LA += libevent_pthreads.la
96 LIBEVENT_PKGCONFIG += libevent_pthreads.pc
97 endif
98 if OPENSSL
99 LIBEVENT_LIBS_LA += libevent_openssl.la
100 LIBEVENT_PKGCONFIG += libevent_openssl.pc
101 endif
102
103 if INSTALL_LIBEVENT
104 lib_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
105 pkgconfig_DATA = $(LIBEVENT_PKGCONFIG)
106 else
107 noinst_LTLIBRARIES =  $(LIBEVENT_LIBS_LA)
108 endif
109
110 SUBDIRS = . include sample test
111
112 if BUILD_WIN32
113
114 SYS_LIBS = -lws2_32 -lshell32 -ladvapi32
115 SYS_SRC = win32select.c evthread_win32.c buffer_iocp.c event_iocp.c \
116         bufferevent_async.c
117 SYS_INCLUDES = -IWIN32-Code
118
119 else
120
121 SYS_LIBS =
122 SYS_SRC =
123 SYS_INCLUDES =
124
125 endif
126
127 if SELECT_BACKEND
128 SYS_SRC += select.c
129 endif
130 if POLL_BACKEND
131 SYS_SRC += poll.c
132 endif
133 if DEVPOLL_BACKEND
134 SYS_SRC += devpoll.c
135 endif
136 if KQUEUE_BACKEND
137 SYS_SRC += kqueue.c
138 endif
139 if EPOLL_BACKEND
140 SYS_SRC += epoll.c
141 endif
142 if EVPORT_BACKEND
143 SYS_SRC += evport.c
144 endif
145 if SIGNAL_SUPPORT
146 SYS_SRC += signal.c
147 endif
148
149 BUILT_SOURCES = ./include/event2/event-config.h
150
151 ./include/event2/event-config.h: config.h
152         @MKDIR_P@ ./include/event2
153         echo '/* event2/event-config.h' > $@
154         echo ' *' >> $@
155         echo ' * This file was generated by autoconf when libevent was built, and post-' >> $@
156         echo ' * processed by Libevent so that its macros would have a uniform prefix.' >> $@
157         echo ' *' >> $@
158         echo ' * DO NOT EDIT THIS FILE.' >> $@
159         echo ' *' >> $@
160         echo ' * Do not rely on macros in this file existing in later versions.'>> $@
161         echo ' */' >> $@
162         echo '#ifndef _EVENT2_EVENT_CONFIG_H_' >> $@
163         echo '#define _EVENT2_EVENT_CONFIG_H_' >> $@
164
165         sed -e 's/#define /#define _EVENT_/' \
166             -e 's/#undef /#undef _EVENT_/' \
167             -e 's/#ifndef /#ifndef _EVENT_/' < config.h >> $@
168         echo "#endif" >> $@
169
170 CORE_SRC = event.c evthread.c buffer.c \
171         bufferevent.c bufferevent_sock.c bufferevent_filter.c \
172         bufferevent_pair.c listener.c bufferevent_ratelim.c \
173         evmap.c log.c evutil.c evutil_rand.c strlcpy.c $(SYS_SRC)
174 EXTRA_SRC = event_tagging.c http.c evdns.c evrpc.c
175
176 if BUILD_WITH_NO_UNDEFINED
177 NO_UNDEFINED = -no-undefined
178 MAYBE_CORE = libevent_core.la
179 else
180 NO_UNDEFINED =
181 MAYBE_CORE =
182 endif
183
184 GENERIC_LDFLAGS = -static
185
186 libevent_la_SOURCES = $(CORE_SRC) $(EXTRA_SRC)
187 libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
188 libevent_la_LDFLAGS = $(GENERIC_LDFLAGS)
189
190 libevent_core_la_SOURCES = $(CORE_SRC)
191 libevent_core_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
192 libevent_core_la_LDFLAGS = $(GENERIC_LDFLAGS)
193
194 if PTHREADS
195 libevent_pthreads_la_SOURCES = evthread_pthread.c
196 libevent_pthreads_la_LIBADD = $(MAYBE_CORE)
197 libevent_pthreads_la_LDFLAGS = $(GENERIC_LDFLAGS)
198 endif
199
200 libevent_extra_la_SOURCES = $(EXTRA_SRC)
201 libevent_extra_la_LIBADD = $(MAYBE_CORE) $(SYS_LIBS)
202 libevent_extra_la_LDFLAGS = $(GENERIC_LDFLAGS)
203
204 if OPENSSL
205 libevent_openssl_la_SOURCES = bufferevent_openssl.c
206 libevent_openssl_la_LIBADD = $(MAYBE_CORE) $(OPENSSL_LIBS)
207 libevent_openssl_la_LDFLAGS = $(GENERIC_LDFLAGS)
208 endif
209
210 noinst_HEADERS = util-internal.h mm-internal.h ipv6-internal.h \
211         evrpc-internal.h strlcpy-internal.h evbuffer-internal.h \
212         bufferevent-internal.h http-internal.h event-internal.h \
213         evthread-internal.h ht-internal.h defer-internal.h \
214         minheap-internal.h log-internal.h evsignal-internal.h evmap-internal.h \
215         changelist-internal.h iocp-internal.h \
216         ratelim-internal.h \
217         WIN32-Code/event2/event-config.h \
218         WIN32-Code/tree.h \
219         compat/sys/queue.h
220
221 EVENT1_HDRS = event.h evhttp.h evdns.h evrpc.h evutil.h
222
223 if INSTALL_LIBEVENT
224 include_HEADERS = $(EVENT1_HDRS)
225 else
226 noinst_HEADERS += $(EVENT1_HDRS)
227 endif
228
229 AM_CPPFLAGS = -I$(srcdir)/compat -I$(srcdir)/include -I./include $(SYS_INCLUDES)
230
231 verify: check
232
233 doxygen: FORCE
234         doxygen $(srcdir)/Doxyfile
235 FORCE:
236
237 DISTCLEANFILES = *~ libevent.pc ./include/event2/event-config.h
238
239 install:
240