mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 04:50:37 -04:00
Merge branch 'build'
This commit is contained in:
commit
7960af5113
69
Makefile.am
69
Makefile.am
@ -1,4 +1,7 @@
|
|||||||
AUTOMAKE_OPTIONS = foreign
|
# '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
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
# This is the version info for the libevent binary API. It has three
|
# This is the version info for the libevent binary API. It has three
|
||||||
@ -32,33 +35,26 @@ ACLOCAL_AMFLAGS = -I m4
|
|||||||
# 3:0:0 -- Libevent 2.0.4-alpha
|
# 3:0:0 -- Libevent 2.0.4-alpha
|
||||||
VERSION_INFO = 3:0:0
|
VERSION_INFO = 3:0:0
|
||||||
|
|
||||||
bin_SCRIPTS = event_rpcgen.py
|
dist_bin_SCRIPTS = event_rpcgen.py
|
||||||
|
|
||||||
pkgconfigdir=$(libdir)/pkgconfig
|
pkgconfigdir=$(libdir)/pkgconfig
|
||||||
pkgconfig_DATA=libevent.pc
|
pkgconfig_DATA=libevent.pc
|
||||||
|
|
||||||
|
# These sources are conditionally added by configure.in or conditionally
|
||||||
|
# included from other files.
|
||||||
|
PLATFORM_DEPENDENT_SRC = \
|
||||||
|
epoll_sub.c \
|
||||||
|
arc4random.c
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
|
evdns.3 event.3 \
|
||||||
LICENSE \
|
LICENSE \
|
||||||
autogen.sh evdns.3 \
|
autogen.sh \
|
||||||
event.3 \
|
|
||||||
libevent.pc.in \
|
libevent.pc.in \
|
||||||
Doxyfile \
|
Doxyfile \
|
||||||
kqueue.c epoll_sub.c epoll.c select.c poll.c signal.c \
|
|
||||||
evport.c devpoll.c win32select.c event_rpcgen.py \
|
|
||||||
event_iocp.c buffer_iocp.c iocp-internal.h arc4random.c \
|
|
||||||
sample/Makefile.am sample/Makefile.in sample/event-test.c \
|
|
||||||
sample/signal-test.c sample/time-test.c \
|
|
||||||
test/Makefile.am test/Makefile.in test/bench.c test/regress.c \
|
|
||||||
test/test-eof.c test/test-weof.c test/test-time.c \
|
|
||||||
test/test-init.c test/test.sh \
|
|
||||||
compat/sys/queue.h \
|
|
||||||
evthread_win32.c \
|
|
||||||
evthread_pthread.c \
|
|
||||||
whatsnew-2.0.txt \
|
whatsnew-2.0.txt \
|
||||||
bufferevent_async.c \
|
Makefile.nmake test/Makefile.nmake \
|
||||||
WIN32-Code/event-config.h \
|
$(PLATFORM_DEPENDENT_SRC)
|
||||||
WIN32-Code/tree.h \
|
|
||||||
Makefile.nmake test/Makefile.nmake
|
|
||||||
|
|
||||||
lib_LTLIBRARIES = libevent.la libevent_core.la libevent_extra.la
|
lib_LTLIBRARIES = libevent.la libevent_core.la libevent_extra.la
|
||||||
if PTHREADS
|
if PTHREADS
|
||||||
@ -85,6 +81,28 @@ SYS_INCLUDES =
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
BUILT_SOURCES = event-config.h
|
BUILT_SOURCES = event-config.h
|
||||||
|
|
||||||
event-config.h: config.h
|
event-config.h: config.h
|
||||||
@ -111,7 +129,6 @@ CORE_SRC = event.c evthread.c buffer.c \
|
|||||||
evmap.c log.c evutil.c evutil_rand.c strlcpy.c $(SYS_SRC)
|
evmap.c log.c evutil.c evutil_rand.c strlcpy.c $(SYS_SRC)
|
||||||
EXTRA_SRC = event_tagging.c http.c evdns.c evrpc.c
|
EXTRA_SRC = event_tagging.c http.c evdns.c evrpc.c
|
||||||
|
|
||||||
|
|
||||||
libevent_la_SOURCES = $(CORE_SRC) $(EXTRA_SRC)
|
libevent_la_SOURCES = $(CORE_SRC) $(EXTRA_SRC)
|
||||||
libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
|
libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
|
||||||
libevent_la_LDFLAGS = -version-info $(VERSION_INFO)
|
libevent_la_LDFLAGS = -version-info $(VERSION_INFO)
|
||||||
@ -131,7 +148,7 @@ libevent_extra_la_LDFLAGS = -version-info $(VERSION_INFO)
|
|||||||
if OPENSSL
|
if OPENSSL
|
||||||
libevent_openssl_la_SOURCES = bufferevent_openssl.c
|
libevent_openssl_la_SOURCES = bufferevent_openssl.c
|
||||||
libevent_openssl_la_LIBADD = -lcrypto -lssl
|
libevent_openssl_la_LIBADD = -lcrypto -lssl
|
||||||
libevent_openssl_la_LDFLAGS = -release $(RELEASE) -version-info $(VERSION_INFO)
|
libevent_openssl_la_LDFLAGS = -version-info $(VERSION_INFO)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
noinst_HEADERS = util-internal.h mm-internal.h ipv6-internal.h \
|
noinst_HEADERS = util-internal.h mm-internal.h ipv6-internal.h \
|
||||||
@ -139,8 +156,11 @@ noinst_HEADERS = util-internal.h mm-internal.h ipv6-internal.h \
|
|||||||
bufferevent-internal.h http-internal.h event-internal.h \
|
bufferevent-internal.h http-internal.h event-internal.h \
|
||||||
evthread-internal.h ht-internal.h defer-internal.h \
|
evthread-internal.h ht-internal.h defer-internal.h \
|
||||||
minheap-internal.h log-internal.h evsignal-internal.h evmap-internal.h \
|
minheap-internal.h log-internal.h evsignal-internal.h evmap-internal.h \
|
||||||
changelist-internal.h \
|
changelist-internal.h iocp-internal.h \
|
||||||
ratelim-internal.h
|
ratelim-internal.h \
|
||||||
|
WIN32-Code/event-config.h \
|
||||||
|
WIN32-Code/tree.h \
|
||||||
|
compat/sys/queue.h
|
||||||
|
|
||||||
include_HEADERS = event.h evhttp.h evdns.h evrpc.h evutil.h
|
include_HEADERS = event.h evhttp.h evdns.h evrpc.h evutil.h
|
||||||
|
|
||||||
@ -150,8 +170,7 @@ INCLUDES = -I$(srcdir)/compat -I$(srcdir)/include $(SYS_INCLUDES)
|
|||||||
|
|
||||||
man_MANS = event.3 evdns.3
|
man_MANS = event.3 evdns.3
|
||||||
|
|
||||||
verify: libevent.la
|
verify: check
|
||||||
cd test && make verify
|
|
||||||
|
|
||||||
doxygen: FORCE
|
doxygen: FORCE
|
||||||
doxygen $(srcdir)/Doxyfile
|
doxygen $(srcdir)/Doxyfile
|
||||||
|
41
configure.in
41
configure.in
@ -260,32 +260,23 @@ needsignal=no
|
|||||||
haveselect=no
|
haveselect=no
|
||||||
AC_CHECK_FUNCS(select, [haveselect=yes], )
|
AC_CHECK_FUNCS(select, [haveselect=yes], )
|
||||||
if test "x$haveselect" = "xyes" ; then
|
if test "x$haveselect" = "xyes" ; then
|
||||||
AC_LIBOBJ(select)
|
|
||||||
needsignal=yes
|
needsignal=yes
|
||||||
fi
|
fi
|
||||||
|
AM_CONDITIONAL(SELECT_BACKEND, [test "x$haveselect" = "xyes"])
|
||||||
|
|
||||||
havepoll=no
|
havepoll=no
|
||||||
AC_CHECK_FUNCS(poll, [havepoll=yes], )
|
AC_CHECK_FUNCS(poll, [havepoll=yes], )
|
||||||
if test "x$havepoll" = "xyes" ; then
|
if test "x$havepoll" = "xyes" ; then
|
||||||
AC_LIBOBJ(poll)
|
|
||||||
needsignal=yes
|
|
||||||
fi
|
|
||||||
|
|
||||||
haveepoll=no
|
|
||||||
AC_CHECK_FUNCS(epoll_ctl, [haveepoll=yes], )
|
|
||||||
if test "x$haveepoll" = "xyes" ; then
|
|
||||||
AC_DEFINE(HAVE_EPOLL, 1,
|
|
||||||
[Define if your system supports the epoll system calls])
|
|
||||||
AC_LIBOBJ(epoll)
|
|
||||||
needsignal=yes
|
needsignal=yes
|
||||||
fi
|
fi
|
||||||
|
AM_CONDITIONAL(POLL_BACKEND, [test "x$havepoll" = "xyes"])
|
||||||
|
|
||||||
havedevpoll=no
|
havedevpoll=no
|
||||||
if test "x$ac_cv_header_sys_devpoll_h" = "xyes"; then
|
if test "x$ac_cv_header_sys_devpoll_h" = "xyes"; then
|
||||||
AC_DEFINE(HAVE_DEVPOLL, 1,
|
AC_DEFINE(HAVE_DEVPOLL, 1,
|
||||||
[Define if /dev/poll is available])
|
[Define if /dev/poll is available])
|
||||||
AC_LIBOBJ(devpoll)
|
|
||||||
fi
|
fi
|
||||||
|
AM_CONDITIONAL(DEVPOLL_BACKEND, [test "ac_cv_header_sys_devpoll_h" = "xyes"])
|
||||||
|
|
||||||
havekqueue=no
|
havekqueue=no
|
||||||
if test "x$ac_cv_header_sys_event_h" = "xyes"; then
|
if test "x$ac_cv_header_sys_event_h" = "xyes"; then
|
||||||
@ -340,11 +331,20 @@ main(int argc, char **argv)
|
|||||||
}, [AC_MSG_RESULT(yes)
|
}, [AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_WORKING_KQUEUE, 1,
|
AC_DEFINE(HAVE_WORKING_KQUEUE, 1,
|
||||||
[Define if kqueue works correctly with pipes])
|
[Define if kqueue works correctly with pipes])
|
||||||
AC_LIBOBJ(kqueue)], AC_MSG_RESULT(no), AC_MSG_RESULT(no))
|
havekqueue=yes
|
||||||
|
], AC_MSG_RESULT(no), AC_MSG_RESULT(no))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
AM_CONDITIONAL(KQUEUE_BACKEND, [test "x$havekqueue" = "xyes"])
|
||||||
|
|
||||||
haveepollsyscall=no
|
haveepollsyscall=no
|
||||||
|
haveepoll=no
|
||||||
|
AC_CHECK_FUNCS(epoll_ctl, [haveepoll=yes], )
|
||||||
|
if test "x$haveepoll" = "xyes" ; then
|
||||||
|
AC_DEFINE(HAVE_EPOLL, 1,
|
||||||
|
[Define if your system supports the epoll system calls])
|
||||||
|
needsignal=yes
|
||||||
|
fi
|
||||||
if test "x$ac_cv_header_sys_epoll_h" = "xyes"; then
|
if test "x$ac_cv_header_sys_epoll_h" = "xyes"; then
|
||||||
if test "x$haveepoll" = "xno" ; then
|
if test "x$haveepoll" = "xno" ; then
|
||||||
AC_MSG_CHECKING(for epoll system call)
|
AC_MSG_CHECKING(for epoll system call)
|
||||||
@ -373,28 +373,27 @@ main(int argc, char **argv)
|
|||||||
AC_DEFINE(HAVE_EPOLL, 1,
|
AC_DEFINE(HAVE_EPOLL, 1,
|
||||||
[Define if your system supports the epoll system calls])
|
[Define if your system supports the epoll system calls])
|
||||||
needsignal=yes
|
needsignal=yes
|
||||||
|
have_epoll=yes
|
||||||
AC_LIBOBJ(epoll_sub)
|
AC_LIBOBJ(epoll_sub)
|
||||||
AC_LIBOBJ(epoll)], AC_MSG_RESULT(no), AC_MSG_RESULT(no))
|
], AC_MSG_RESULT(no), AC_MSG_RESULT(no))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
AM_CONDITIONAL(EPOLL_BACKEND, [test "x$haveepoll" = "xyes"])
|
||||||
|
|
||||||
haveeventports=no
|
haveeventports=no
|
||||||
AC_CHECK_FUNCS(port_create, [haveeventports=yes], )
|
AC_CHECK_FUNCS(port_create, [haveeventports=yes], )
|
||||||
if test "x$haveeventports" = "xyes" ; then
|
if test "x$haveeventports" = "xyes" ; then
|
||||||
AC_DEFINE(HAVE_EVENT_PORTS, 1,
|
AC_DEFINE(HAVE_EVENT_PORTS, 1,
|
||||||
[Define if your system supports event ports])
|
[Define if your system supports event ports])
|
||||||
AC_LIBOBJ(evport)
|
|
||||||
needsignal=yes
|
needsignal=yes
|
||||||
fi
|
fi
|
||||||
|
AM_CONDITIONAL(EVPORT_BACKEND, [test "x$haveeventports" = "xyes"])
|
||||||
|
|
||||||
if test "x$bwin32" = "xtrue"; then
|
if test "x$bwin32" = "xtrue"; then
|
||||||
needsignal=yes
|
needsignal=yes
|
||||||
fi
|
fi
|
||||||
if test "x$bwin32" = "xtrue"; then
|
|
||||||
needsignal=yes
|
AM_CONDITIONAL(SIGNAL_SUPPORT, [test "x$needsignal" = "xyes"])
|
||||||
fi
|
|
||||||
if test "x$needsignal" = "xyes" ; then
|
|
||||||
AC_LIBOBJ(signal)
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_TYPE_PID_T
|
AC_TYPE_PID_T
|
||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
|
@ -2,12 +2,14 @@ AUTOMAKE_OPTIONS = foreign no-dependencies
|
|||||||
|
|
||||||
AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/compat -I$(top_srcdir)/include
|
AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/compat -I$(top_srcdir)/include
|
||||||
|
|
||||||
EXTRA_DIST = regress.rpc regress.gen.h regress.gen.c
|
EXTRA_DIST = regress.rpc regress.gen.h regress.gen.c test.sh
|
||||||
|
|
||||||
noinst_PROGRAMS = test-init test-eof test-weof test-time regress \
|
noinst_PROGRAMS = test-init test-eof test-weof test-time regress \
|
||||||
bench bench_cascade bench_http bench_httpclient test-ratelim
|
bench bench_cascade bench_http bench_httpclient test-ratelim
|
||||||
noinst_HEADERS = tinytest.h tinytest_macros.h regress.h
|
noinst_HEADERS = tinytest.h tinytest_macros.h regress.h
|
||||||
|
|
||||||
|
TESTS = $(top_srcdir)/test/test.sh
|
||||||
|
|
||||||
BUILT_SOURCES = regress.gen.c regress.gen.h
|
BUILT_SOURCES = regress.gen.c regress.gen.h
|
||||||
test_init_SOURCES = test-init.c
|
test_init_SOURCES = test-init.c
|
||||||
test_init_LDADD = ../libevent_core.la
|
test_init_LDADD = ../libevent_core.la
|
||||||
@ -61,9 +63,6 @@ regress.gen.c regress.gen.h: regress.rpc $(top_srcdir)/event_rpcgen.py
|
|||||||
|
|
||||||
DISTCLEANFILES = *~
|
DISTCLEANFILES = *~
|
||||||
|
|
||||||
test: test-init test-eof test-weof test-time regress
|
verify: check
|
||||||
|
|
||||||
verify: test
|
|
||||||
@$(srcdir)/test.sh
|
|
||||||
|
|
||||||
bench test-init test-eof test-weof test-time: ../libevent.la
|
bench test-init test-eof test-weof test-time: ../libevent.la
|
||||||
|
Loading…
x
Reference in New Issue
Block a user