mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-12 13:58:58 -04:00
update build stuff
svn:r76
This commit is contained in:
parent
2bf53326c0
commit
dd0b36ab03
14
Makefile.am
14
Makefile.am
@ -1,15 +1,21 @@
|
|||||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||||
|
|
||||||
CFLAGS += -Wall -g -O2
|
CFLAGS = -Wall -Werror @CFLAGS@
|
||||||
SUBDIRS = . sample test
|
SUBDIRS = . sample test
|
||||||
|
|
||||||
EXTRA_DIST = acconfig.h epoll.c err.c event.h kqueue.c select.c \
|
EXTRA_DIST = acconfig.h err.c event.h evsignal.h event.3 \
|
||||||
epoll_sub.c evsignal.h poll.c signal.c event.3 \
|
|
||||||
sample/Makefile.am sample/Makefile.in sample/event-test.c \
|
sample/Makefile.am sample/Makefile.in sample/event-test.c \
|
||||||
sample/signal-test.c sample/time-test.c \
|
sample/signal-test.c sample/time-test.c \
|
||||||
test/Makefile.am test/Makefile.in test/bench.c test/regress.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-eof.c test/test-weof.c test/test-time.c \
|
||||||
compat/err.h compat/sys/queue.h compat/sys/tree.h compat/sys/_time.h
|
compat/err.h compat/sys/queue.h compat/sys/tree.h compat/sys/_time.h \
|
||||||
|
WIN32-Code WIN32-Code/config.h WIN32-Code/win32.c~ WIN32-Code/misc.c \
|
||||||
|
WIN32-Code/win32.c WIN32-Code/misc.h \
|
||||||
|
WIN32-Prj WIN32-Prj/event_test WIN32-Prj/event_test/event_test.dsp \
|
||||||
|
WIN32-Prj/event_test/test.txt WIN32-Prj/libevent.dsp \
|
||||||
|
WIN32-Prj/libevent.dsw WIN32-Prj/signal_test \
|
||||||
|
WIN32-Prj/signal_test/signal_test.dsp WIN32-Prj/time_test \
|
||||||
|
WIN32-Prj/time_test/time_test.dsp
|
||||||
|
|
||||||
lib_LIBRARIES = libevent.a
|
lib_LIBRARIES = libevent.a
|
||||||
|
|
||||||
|
63
configure.in
63
configure.in
@ -2,8 +2,9 @@ dnl configure.in for libevent
|
|||||||
dnl Dug Song <dugsong@monkey.org>
|
dnl Dug Song <dugsong@monkey.org>
|
||||||
AC_INIT(event.c)
|
AC_INIT(event.c)
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE(libevent,0.7a)
|
AM_INIT_AUTOMAKE(libevent,0.7b)
|
||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
dnl Initialize prefix.
|
dnl Initialize prefix.
|
||||||
if test "$prefix" = "NONE"; then
|
if test "$prefix" = "NONE"; then
|
||||||
@ -61,15 +62,61 @@ 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])
|
AC_LIBOBJ(select)
|
||||||
needsignal=yes
|
needsignal=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
havepoll=no
|
havepoll=no
|
||||||
|
havertsig=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])
|
AC_LIBOBJ(poll)
|
||||||
needsignal=yes
|
needsignal=yes
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS(sigtimedwait, [havertsig=yes], )
|
||||||
|
fi
|
||||||
|
if test "x$havertsig" = "xyes" ; then
|
||||||
|
AC_MSG_CHECKING(for F_SETSIG in fcntl.h)
|
||||||
|
AC_EGREP_CPP(yes,
|
||||||
|
[
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#include <fcntl.h>
|
||||||
|
#ifdef F_SETSIG
|
||||||
|
yes
|
||||||
|
#endif
|
||||||
|
], [ AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no); havertsig=no])
|
||||||
|
fi
|
||||||
|
if test "x$havertsig" = "xyes" ; then
|
||||||
|
AC_DEFINE(HAVE_RTSIG, 1, [Define if your system supports POSIX realtime signals])
|
||||||
|
AC_LIBOBJ(rtsig)
|
||||||
|
AC_MSG_CHECKING(for working rtsig on pipes)
|
||||||
|
AC_TRY_RUN(
|
||||||
|
[
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
int sigio()
|
||||||
|
{
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int fd[2];
|
||||||
|
|
||||||
|
pipe(fd);
|
||||||
|
signal(SIGIO, sigio);
|
||||||
|
fcntl(fd[0], F_SETOWN, getpid());
|
||||||
|
fcntl(fd[0], F_SETSIG, SIGIO);
|
||||||
|
fcntl(fd[0], F_SETFL, fcntl(fd[0], F_GETFL) | O_ASYNC);
|
||||||
|
write(fd[1], "", 1);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
], [ AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_WORKING_RTSIG, 1, [Define if realtime signals work on pipes])],
|
||||||
|
AC_MSG_RESULT(no))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
haveepoll=no
|
haveepoll=no
|
||||||
@ -77,7 +124,7 @@ AC_CHECK_FUNCS(epoll_ctl, [haveepoll=yes], )
|
|||||||
if test "x$haveepoll" = "xyes" ; then
|
if test "x$haveepoll" = "xyes" ; then
|
||||||
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])
|
||||||
AC_LIBOBJ([epoll])
|
AC_LIBOBJ(epoll)
|
||||||
needsignal=yes
|
needsignal=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -134,7 +181,7 @@ 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))
|
AC_LIBOBJ(kqueue)], AC_MSG_RESULT(no), AC_MSG_RESULT(no))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -167,13 +214,13 @@ 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
|
||||||
AC_LIBOBJ([epoll_sub])
|
AC_LIBOBJ(epoll_sub)
|
||||||
AC_LIBOBJ([epoll])], AC_MSG_RESULT(no), AC_MSG_RESULT(no))
|
AC_LIBOBJ(epoll)], AC_MSG_RESULT(no), AC_MSG_RESULT(no))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$needsignal" = "xyes" ; then
|
if test "x$needsignal" = "xyes" ; then
|
||||||
AC_LIBOBJ([signal])
|
AC_LIBOBJ(signal)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_REPLACE_FUNCS(err)
|
AC_REPLACE_FUNCS(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user