summaryrefslogtreecommitdiffstats
path: root/unix/configure.ac
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-03-08 13:35:23 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-03-08 13:35:23 (GMT)
commit02cf886320e28b6ddbdb02991292a241a8ad4127 (patch)
tree63dbdd547fc5615d26052a8783a43913071689af /unix/configure.ac
parent878d776fd16ffba80f2e37494198b6d90b66f72c (diff)
parentcda6d2b5a4a63d4d80cfcbd58598686e5cfd0f35 (diff)
downloadtcl-02cf886320e28b6ddbdb02991292a241a8ad4127.zip
tcl-02cf886320e28b6ddbdb02991292a241a8ad4127.tar.gz
tcl-02cf886320e28b6ddbdb02991292a241a8ad4127.tar.bz2
Re-base to trunk, and get latest code from here: [https://github.com/lalbornoz/tcl/tree/tip458]. Untested.
Diffstat (limited to 'unix/configure.ac')
-rw-r--r--unix/configure.ac31
1 files changed, 31 insertions, 0 deletions
diff --git a/unix/configure.ac b/unix/configure.ac
index bafb970..b43da6d 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -300,6 +300,37 @@ if test $tcl_ok = no; then
AC_DEFINE(NO_FD_SET, 1, [Do we have fd_set?])
fi
+#------------------------------------------------------------------------
+# Options for the notifier. Checks for epoll(7) on Linux, and
+# kqueue(2) on {DragonFly,Free,Net,Open}BSD
+#------------------------------------------------------------------------
+
+AC_MSG_CHECKING([for advanced notifier support])
+case x`uname -s` in
+ xLinux)
+ AC_MSG_RESULT([epoll(7)])
+ AC_CHECK_HEADERS([sys/epoll.h],
+ [AC_DEFINE(NOTIFIER_EPOLL, [1], [Is epoll(7) supported?])])
+ AC_CHECK_HEADERS([sys/eventfd.h],
+ [AC_DEFINE(HAVE_EVENTFD, [1], [Is eventfd(2) supported?])]);;
+ xDragonFlyBSD|xFreeBSD|xNetBSD|xOpenBSD)
+ AC_MSG_RESULT([kqueue(2)])
+ # Messy because we want to check if *all* the headers are present, and not
+ # just *any*
+ tcl_kqueue_headers=x
+ AC_CHECK_HEADERS([sys/types.h sys/event.h sys/time.h],
+ [tcl_kqueue_headers=${tcl_kqueue_headers}y])
+ AS_IF([test $tcl_kqueue_headers = xyyy], [
+ AC_DEFINE(NOTIFIER_KQUEUE, [1], [Is kqueue(2) supported?])]);;
+ xDarwin)
+ # Assume that we've got CoreFoundation present (checked elsewhere because
+ # of wider impact).
+ AC_MSG_RESULT([OSX]);;
+ *)
+ AC_DEFINE_UNQUOTED(NOTIFIER_SELECT)
+ AC_MSG_RESULT([none]);;
+esac
+
#------------------------------------------------------------------------------
# Find out all about time handling differences.
#------------------------------------------------------------------------------