]> granicus.if.org Git - mutt/commitdiff
Fix inotify configure test.
authorKevin McCarthy <kevin@8t8.us>
Wed, 28 Aug 2019 21:41:26 +0000 (14:41 -0700)
committerKevin McCarthy <kevin@8t8.us>
Wed, 28 Aug 2019 21:41:26 +0000 (14:41 -0700)
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

index fc1aca6c8461ba66507497d2e27ed4d27d80086f..ddb02d0585cc1ea8a7a9e0823c512dfd44376fae 100644 (file)
@@ -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