/* define this if you have the libsieve mailbox filtering library available */
#undef HAVE_LIBSIEVE
+/* define if using OS X/Darwin */
+#undef HAVE_DARWIN
+
/* define this if you have the newt window library available */
#undef HAVE_NEWT
;;
esac
])
-
+AC_CANONICAL_HOST
+AC_MSG_CHECKING([for reality distorion field])
+case "$host" in
+ dnl TCP buffering isn't ideal under OS X. This define should also be
+ dnl checked in other cases of OS X-Linux differences.
+ *-*-darwin*)
+ AC_DEFINE(HAVE_DARWIN)
+ AC_MSG_RESULT([present])
+ ;;
+ *)
+ AC_MSG_RESULT([missing])
+ ;;
+esac
dnl Done! Now write the Makefile and sysdep.h
AC_SUBST(AUTH)
AC_SUBST(CHKPWD)
* native TCP buffering (Linux & *BSD), use that; otherwise, emulate it with
* user-space buffering.
*/
+#ifndef HAVE_DARWIN
#ifdef TCP_CORK
# define HAVE_TCP_BUFFERING
#else
# define HAVE_TCP_BUFFERING
# define TCP_CORK TCP_NOPUSH
# endif
-#endif
-
+#endif /* TCP_CORK */
+#endif /* HAVE_DARWIN */
#ifdef HAVE_TCP_BUFFERING
static unsigned on = 1, off = 0;
setsockopt(ctx->client_socket, IPPROTO_TCP, TCP_CORK, &off, 4);
setsockopt(ctx->client_socket, IPPROTO_TCP, TCP_CORK, &on, 4);
}
+#elif HAVE_DARWIN
+/* Stub functions for Darwin/OS X where TCP buffering isn't liked at all */
+void buffer_output(void) {
+CC->buffering = 0;
+}
+void unbuffer_output(void) {
+CC->buffering = 0;
+}
+void flush_output(void) {
+}
#else
void buffer_output(void) {
if (CC->buffering == 0) {