summaryrefslogtreecommitdiffstats
path: root/unix/configure.ac
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-06-09 11:48:54 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-06-09 11:48:54 (GMT)
commit4ac08a5375ba3f55cabdefe8744e465d8f9f5e84 (patch)
tree75e5bb051f189e5c578d6c18ce644f610ecf2bba /unix/configure.ac
parentf9abf48ecf1f023447fcffb2ea01493818be568d (diff)
parent54043c0ee1e2abd1f01eeb0e8795522e5d1ab4bb (diff)
downloadtcl-4ac08a5375ba3f55cabdefe8744e465d8f9f5e84.zip
tcl-4ac08a5375ba3f55cabdefe8744e465d8f9f5e84.tar.gz
tcl-4ac08a5375ba3f55cabdefe8744e465d8f9f5e84.tar.bz2
merge novem
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 ad7b667..5374f50 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.
#------------------------------------------------------------------------------