From 4c2f7c70145e12c2605f7714c4e17d9a99e7f7e2 Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Wed, 28 Aug 2019 14:41:26 -0700 Subject: [PATCH] Fix inotify configure test. 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. --- configure.ac | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index fc1aca6c..ddb02d05 100644 --- a/configure.ac +++ b/configure.ac @@ -855,13 +855,9 @@ AC_ARG_ENABLE(filemonitor, AS_HELP_STRING([--disable-filemonitor],[Disable file 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 -- 2.50.0