1AC_DEFUN([DOVECOT_NOTIFY], [ 2 have_notify=none 3 4 if test "$notify" = "" || test "$notify" = "inotify" ; then 5 dnl * inotify? 6 AC_MSG_CHECKING([whether we can use inotify]) 7 if test "$ac_cv_func_inotify_init" = yes; then 8 have_notify=inotify 9 notify=inotify 10 AC_MSG_RESULT("yes") 11 AC_DEFINE(IOLOOP_NOTIFY_INOTIFY,, [Use Linux inotify]) 12 else 13 AC_MSG_RESULT("no") 14 if test "$notify" = "inotify"; then 15 AC_MSG_ERROR([inotify requested but not available]) 16 notify="" 17 fi 18 fi 19 fi 20 21 if (test "$notify" = "" && test "$ioloop" = kqueue) || test "$notify" = "kqueue"; then 22 dnl * BSD kqueue() notify 23 AC_MSG_CHECKING([whether we can use BSD kqueue() notify]) 24 if test "$ac_cv_func_kqueue" = yes && test "$ac_cv_func_kevent" = yes ; then 25 have_notify=kqueue 26 notify=kqueue 27 AC_MSG_RESULT("yes") 28 AC_DEFINE(IOLOOP_NOTIFY_KQUEUE,, [Use BSD kqueue directory changes notification]) 29 else 30 AC_MSG_RESULT("no") 31 if test "$notify" = "kqueue" ; then 32 AC_MSG_ERROR([kqueue notify requested but kqueue() is not available]) 33 notify="" 34 fi 35 fi 36 fi 37 38 if test "$have_notify" = "none"; then 39 AC_DEFINE(IOLOOP_NOTIFY_NONE,, [No special notify support]) 40 fi 41]) 42