AUTOMAKE_OPTIONS = foreign no-dependencies
-CFLAGS += -Wall -g -O2
+CFLAGS = -Wall -Werror @CFLAGS@
SUBDIRS = . sample test
-EXTRA_DIST = acconfig.h epoll.c err.c event.h kqueue.c select.c \
- epoll_sub.c evsignal.h poll.c signal.c event.3 \
+EXTRA_DIST = acconfig.h err.c event.h evsignal.h event.3 \
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 \
- 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
dnl Dug Song <dugsong@monkey.org>
AC_INIT(event.c)
-AM_INIT_AUTOMAKE(libevent,0.7a)
+AM_INIT_AUTOMAKE(libevent,0.7b)
AM_CONFIG_HEADER(config.h)
+AM_MAINTAINER_MODE
dnl Initialize prefix.
if test "$prefix" = "NONE"; then
haveselect=no
AC_CHECK_FUNCS(select, [haveselect=yes], )
if test "x$haveselect" = "xyes" ; then
- AC_LIBOBJ([select])
+ AC_LIBOBJ(select)
needsignal=yes
fi
havepoll=no
+havertsig=no
AC_CHECK_FUNCS(poll, [havepoll=yes], )
if test "x$havepoll" = "xyes" ; then
- AC_LIBOBJ([poll])
+ AC_LIBOBJ(poll)
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
haveepoll=no
if test "x$haveepoll" = "xyes" ; then
AC_DEFINE(HAVE_EPOLL, 1,
[Define if your system supports the epoll system calls])
- AC_LIBOBJ([epoll])
+ AC_LIBOBJ(epoll)
needsignal=yes
fi
}, [AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_WORKING_KQUEUE, 1,
[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
AC_DEFINE(HAVE_EPOLL, 1,
[Define if your system supports the epoll system calls])
needsignal=yes
- AC_LIBOBJ([epoll_sub])
- AC_LIBOBJ([epoll])], AC_MSG_RESULT(no), AC_MSG_RESULT(no))
+ AC_LIBOBJ(epoll_sub)
+ AC_LIBOBJ(epoll)], AC_MSG_RESULT(no), AC_MSG_RESULT(no))
fi
fi
if test "x$needsignal" = "xyes" ; then
- AC_LIBOBJ([signal])
+ AC_LIBOBJ(signal)
fi
AC_REPLACE_FUNCS(err)