What configuration options do you want used?
--with-ioloop=kqueue should set both ioloop and notify to kqueue.
Building fails. First: --- src/lib/ioloop-notify-kqueue.c.orig Wed Aug 16 10:50:24 2006 +++ src/lib/ioloop-notify-kqueue.c Wed Aug 16 10:51:31 2006 @@ -34,6 +34,7 @@ struct io *io; struct kevent ev; struct timespec ts; + int ret; if (gettimeofday(&ioloop_timeval, &ioloop_timezone) < 0) i_fatal("gettimeofday() failed: %m"); But still fails with: source='ioloop-notify-kqueue.c' object='ioloop-notify-kqueue.o' libtool=no DEPDIR=.deps depmode=gcc /bin/bash ../../depcomp gcc -DHAVE_CONFIG_H -I. -I. -I../.. -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -c ioloop-notify-kqueue.c ioloop-notify-kqueue.c: In function `io_loop_notify_add': ioloop-notify-kqueue.c:114: invalid type argument of `->' ioloop-notify-kqueue.c:114: invalid type argument of `->' ioloop-notify-kqueue.c:114: invalid type argument of `->' ioloop-notify-kqueue.c:114: invalid type argument of `->' ioloop-notify-kqueue.c:115: invalid type argument of `->' ioloop-notify-kqueue.c:115: invalid type argument of `->' ioloop-notify-kqueue.c: In function `io_loop_notify_remove': ioloop-notify-kqueue.c:139: invalid type argument of `->' ioloop-notify-kqueue.c:139: invalid type argument of `->' ioloop-notify-kqueue.c:139: invalid type argument of `->' ioloop-notify-kqueue.c:139: invalid type argument of `->' ioloop-notify-kqueue.c:139: invalid type argument of `->' ioloop-notify-kqueue.c:139: invalid type argument of `->' *** Error code 1