summaryrefslogtreecommitdiffstats
path: root/unix/configure
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2016-11-25 15:44:43 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2016-11-25 15:44:43 (GMT)
commitcda6d2b5a4a63d4d80cfcbd58598686e5cfd0f35 (patch)
tree4b18b033b648b2726b82cee5d08cb3d5d4f0e4d9 /unix/configure
parent7b4af51ed2c67661856796cc6669052b86bda825 (diff)
downloadtcl-cda6d2b5a4a63d4d80cfcbd58598686e5cfd0f35.zip
tcl-cda6d2b5a4a63d4d80cfcbd58598686e5cfd0f35.tar.gz
tcl-cda6d2b5a4a63d4d80cfcbd58598686e5cfd0f35.tar.bz2
Implementation of improved notifier from Lucio Andrés Illanes Albornoz.
Diffstat (limited to 'unix/configure')
-rwxr-xr-xunix/configure60
1 files changed, 60 insertions, 0 deletions
diff --git a/unix/configure b/unix/configure
index baea1f1..14f88f3 100755
--- a/unix/configure
+++ b/unix/configure
@@ -8439,6 +8439,66 @@ $as_echo "#define NO_FD_SET 1" >>confdefs.h
fi
+#-----------------------------------------------------------------------------
+# Options for the notifier. Checks for epoll(7) on Linux, and kqueue(2)
+# on FreeBSD.
+#-----------------------------------------------------------------------------
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for advanced notifier support" >&5
+$as_echo_n "checking for advanced notifier support... " >&6; }
+case x`uname -s` in
+ xLinux)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: epoll(7)" >&5
+$as_echo "epoll(7)" >&6; }
+ for ac_header in sys/epoll.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_epoll_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_EPOLL_H 1
+_ACEOF
+
+$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
+
+fi
+
+done
+;;
+ xFreeBSD)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: kqueue(2)" >&5
+$as_echo "kqueue(2)" >&6; }
+ # Messy because we want to check if *all* the headers are present, and not
+ # just *any*
+ tcl_kqueue_headers=x
+ for ac_header in sys/types.h sys/event.h sys/time.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ tcl_kqueue_headers=${tcl_kqueue_headers}y
+fi
+
+done
+
+ if test $tcl_kqueue_headers = xyyy; then :
+
+
+$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
+
+fi;;
+ xDarwin)
+ # Assume that we've got CoreFoundation present (checked elsewhere because
+ # of wider impact).
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: OSX" >&5
+$as_echo "OSX" >&6; };;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; };;
+esac
+
#------------------------------------------------------------------------------
# Find out all about time handling differences.
#------------------------------------------------------------------------------