From 16cbf3c076a0aca6d47adaf3f719493674cf2363 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 17 Jan 2017 20:00:00 +0300 Subject: Initial version. --- auto/events | 196 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 auto/events (limited to 'auto/events') diff --git a/auto/events b/auto/events new file mode 100644 index 00000000..700dc20c --- /dev/null +++ b/auto/events @@ -0,0 +1,196 @@ + +# Copyright (C) Igor Sysoev +# Copyright (C) NGINX, Inc. + + +# Linux epoll. + +nxt_feature="Linux epoll" +nxt_feature_name=NXT_HAVE_EPOLL +nxt_feature_run= +nxt_feature_incs= +nxt_feature_libs= +nxt_feature_test="#include + #include + + int main() { + int n; + + n = epoll_create(1); + close(n); + return 0; + }" +. auto/feature + +if [ $nxt_found = yes ]; then + NXT_HAVE_EPOLL=YES + + nxt_feature="Linux signalfd()" + nxt_feature_name=NXT_HAVE_SIGNALFD + nxt_feature_run= + nxt_feature_incs= + nxt_feature_libs= + nxt_feature_test="#include + #include + #include + + int main() { + int n; + sigset_t mask; + + sigemptyset(&mask); + n = signalfd(-1, &mask, 0); + close(n); + return 0; + }" + . auto/feature + + + nxt_feature="Linux eventfd()" + nxt_feature_name=NXT_HAVE_EVENTFD + nxt_feature_run= + nxt_feature_incs= + nxt_feature_libs= + nxt_feature_test="#include + #include + + int main() { + int n; + + n = eventfd(0, 0); + close(n); + return 0; + }" + . auto/feature + +else + NXT_HAVE_EPOLL=NO +fi + + +# FreeBSD, MacOSX, NetBSD, OpenBSD kqueue. + +nxt_feature="kqueue" +nxt_feature_name=NXT_HAVE_KQUEUE +nxt_feature_run= +nxt_feature_incs= +nxt_feature_libs= +nxt_feature_test="#include + #include + #include + + int main() { + int n; + + n = kqueue(); + close(n); + return 0; + }" +. auto/feature + +if [ $nxt_found = yes ]; then + NXT_HAVE_KQUEUE=YES + + nxt_feature="kqueue EVFILT_USER" + nxt_feature_name=NXT_HAVE_EVFILT_USER + nxt_feature_run= + nxt_feature_incs= + nxt_feature_libs= + nxt_feature_test="#include + #include + #include + + int main() { + struct kevent kev; + + kev.filter = EVFILT_USER; + kevent(0, &kev, 1, NULL, 0, NULL); + return 0; + }" + . auto/feature + +else + NXT_HAVE_KQUEUE=NO +fi + + +# Solaris event port. + +nxt_feature="Solaris event port" +nxt_feature_name=NXT_HAVE_EVENTPORT +nxt_feature_run= +nxt_feature_incs= +nxt_feature_libs= +nxt_feature_test="#include + #include + + int main() { + int n; + + n = port_create(); + close(n); + return 0; + }" +. auto/feature + +if [ $nxt_found = yes ]; then + NXT_HAVE_EVENTPORT=YES +else + NXT_HAVE_EVENTPORT=NO +fi + + +# Solaris, HP-UX, IRIX, Tru64 UNIX /dev/poll. + +nxt_feature="/dev/poll" +nxt_feature_name=NXT_HAVE_DEVPOLL +nxt_feature_run=yes +nxt_feature_incs= +nxt_feature_libs= +nxt_feature_test="#include + #include + #include + #include + + int main() { + int n; + + n = open(\"/dev/poll\", O_RDWR); + close(n); + return 0; + }" +. auto/feature + +if [ $nxt_found = yes ]; then + NXT_HAVE_DEVPOLL=YES +else + NXT_HAVE_DEVPOLL=NO +fi + + +# AIX pollset. + +nxt_feature="AIX pollset" +nxt_feature_name=NXT_HAVE_POLLSET +nxt_feature_run=yes +nxt_feature_incs= +nxt_feature_libs= +nxt_feature_test="#include + #include + #include + #include + + int main() { + pollset_t n; + + n = pollset_create(-1); + pollset_destroy(n); + return 0; + }" +. auto/feature + +if [ $nxt_found = yes ]; then + NXT_HAVE_POLLSET=YES +else + NXT_HAVE_POLLSET=NO +fi -- cgit