AC_CHECK_FUNCS executes "action-if-found" or "action-if-not-found" for
each function in the list. If a system has some but not all of the
functions, both will end up being executed.
This caused a build failure on an older system with exactly that
situation.
Change to only define USE_INOTIFY if all functions exist.
if test x$have_filemonitor != xno ; then
AC_CHECK_FUNCS(inotify_init1 inotify_add_watch inotify_rm_watch,
- [
- AC_DEFINE(USE_INOTIFY,1,[ Define if want to use inotify for filesystem monitoring (available in Linux only). ])
- ],
- [
- have_filemonitor=no
- ])
+ [], [have_filemonitor=no])
if test x$have_filemonitor != xno ; then
+ AC_DEFINE(USE_INOTIFY,1,[ Define if want to use inotify for filesystem monitoring (available in Linux only). ])
AC_CHECK_HEADERS(sys/inotify.h)
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS monitor.o"
fi