Changeset 14651 for trunk/configure.ac


Ignore:
Timestamp:
Jan 2, 2016, 2:28:59 PM (6 years ago)
Author:
mikedld
Message:

#5663: Rework directory watching in daemon

Implement BSD/Darwin (kqueue) and Windows (ReadDirectoryChanges?) mechanisms
for receiving directory change notifications. Use events instead of polling
for changes. Retry file parsing up to 3 times before giving up.

Huge thanks to missionsix for preparing first two versions of the patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r14645 r14651  
    205205dnl file monitoring for the daemon
    206206
    207 AC_CHECK_HEADER([sys/inotify.h],
    208                 [AC_CHECK_FUNC([inotify_init],[have_inotify="yes"],[have_inotify="no"])],
    209                 [have_inotify="no"])
    210207AC_ARG_WITH([inotify],
    211             [AS_HELP_STRING([--with-inotify],[Enable inotify support (default=auto)])],
    212             [want_inotify=${withval}],
    213             [want_inotify=${have_inotify}])
    214 if test "x$want_inotify" = "xyes" ; then
    215     if test "x$have_inotify" = "xyes"; then
    216       AC_DEFINE([WITH_INOTIFY],[1])
    217     else
    218       AC_MSG_ERROR("inotify not found!")
    219     fi
    220 fi
    221 
    222 AC_CHECK_HEADER([sys/event.h],
    223                 [AC_CHECK_FUNC([kqueue],[have_kqueue="yes"],[have_kqueue="no"])],
    224                 [have_kqueue="no"])
     208            [AS_HELP_STRING([--with-inotify], [Enable inotify support (default=auto)])],
     209            [WANT_INOTIFY=${withval}],
     210            [WANT_INOTIFY=auto])
     211HAVE_INOTIFY=0
     212AS_IF([test "x$WANT_INOTIFY" != "xno"],
     213      [AC_CHECK_HEADER([sys/inotify.h],
     214                       [AC_CHECK_FUNC([inotify_init],
     215                                      [HAVE_INOTIFY=1])],
     216                       [AS_IF([test "x$WANT_INOTIFY" = "xyes"],
     217                              [AC_MSG_ERROR("inotify not found!")])])])
     218AM_CONDITIONAL([USE_INOTIFY], [test "x$WANT_INOTIFY" != "xno" -a $HAVE_INOTIFY -eq 1])
     219
    225220AC_ARG_WITH([kqueue],
    226221            [AS_HELP_STRING([--with-kqueue],[Enable kqueue support (default=auto)])],
    227             [want_kqueue=${withval}],
    228             [want_kqueue=${have_kqueue}])
    229 if test "x$want_kqueue" = "xyes" ; then
    230     if test "x$have_kqueue" = "xyes"; then
    231       AC_DEFINE([WITH_KQUEUE],[1])
    232     else
    233       AC_MSG_ERROR("kqueue not found!")
    234     fi
    235 fi
     222            [WITH_KQUEUE=${withval}],
     223            [WITH_KQUEUE=auto])
     224HAVE_KQUEUE=0
     225AS_IF([test "x$WITH_KQUEUE" != "xno"],
     226      [AC_CHECK_HEADER([sys/event.h],
     227                       [AC_CHECK_FUNC([kqueue],
     228                                      [HAVE_KQUEUE=1])],
     229                       [AS_IF([test "x$WANT_KQUEUE" = "xyes"],
     230                              [AC_MSG_ERROR("kqueue not found!")])])])
     231AM_CONDITIONAL([USE_KQUEUE], [test "x$WITH_KQUEUE" != "xno" -a $HAVE_KQUEUE -eq 1])
     232
    236233
    237234AC_CHECK_HEADERS([sys/statvfs.h \
Note: See TracChangeset for help on using the changeset viewer.