Changeset 7979 for trunk/configure.ac


Ignore:
Timestamp:
Mar 1, 2009, 3:38:58 PM (14 years ago)
Author:
charles
Message:

(trunk daemon) #1882: take KyleK's suggestion of using inotify when possible. As he writes, "the opendir() approach will basically prevent my NAS drives to go to standby."

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r7974 r7979  
    111111#include <fcntl.h>])
    112112AC_CHECK_FUNCS([posix_fadvise])
     113
     114
     115dnl ----------------------------------------------------------------------------
     116dnl
     117dnl file monitoring for the daemon
     118
     119AC_CHECK_HEADER([sys/inotify.h],
     120                [AC_CHECK_FUNC([inotify_init],[have_inotify="yes"],[have_inotify="no"])],
     121                [have_inotify="no"])
     122AC_ARG_WITH([inotify],
     123            [AS_HELP_STRING([--with-inotify],[Enable inotify support (default=auto)])],
     124            [want_inotify=${enableval}],
     125            [want_inotify=${have_inotify}])
     126if test "x$want_inotify" = "xyes" ; then
     127    if test "x$have_inotify" = "xyes"; then
     128      AC_DEFINE([WITH_INOTIFY],[1])
     129    else
     130      AC_MSG_ERROR("inotify not found!")
     131    fi
     132fi
     133 
     134AC_CHECK_HEADER([sys/event.h],
     135                [AC_CHECK_FUNC([kqueue],[have_kqueue="yes"],[have_kqueue="no"])],
     136                [have_kqueue="no"])
     137AC_ARG_WITH([kqueue],
     138            [AS_HELP_STRING([--with-kqueue],[Enable kqueue support (default=auto)])],
     139            [want_kqueue=${enableval}],
     140            [want_kqueue=${have_kqueue}])
     141if test "x$want_kqueue" = "xyes" ; then
     142    if test "x$have_kqueue" = "xyes"; then
     143      AC_DEFINE([WITH_KQUEUE],[1])
     144    else
     145      AC_MSG_ERROR("kqueue not found!")
     146    fi
     147fi
    113148
    114149
Note: See TracChangeset for help on using the changeset viewer.