--- inotify-tools-3.13.orig/configure.ac	2009-01-25 11:40:19.000000000 -0500
+++ inotify-tools-3.13/configure.ac	2009-01-25 11:32:06.000000000 -0500
@@ -44,14 +44,15 @@
 # Checks for header files.
 AC_CHECK_HEADERS([sys/inotify.h mcheck.h])
 AC_LANG(C)
-AC_MSG_CHECKING([whether sys/inotify.h actually works])
-AC_RUN_IFELSE(
-  AC_LANG_PROGRAM([[#include <sys/inotify.h>]],
-                  [[return (-1 == inotify_init());]]
-  ),
-  [AC_MSG_RESULT([yup]); AC_DEFINE([SYS_INOTIFY_H_EXISTS_AND_WORKS],[1],[sys/inotify.h exists and works correctly])],
-  [AC_MSG_RESULT([nope, using own inotify headers])]
-)
+AC_CACHE_CHECK([whether sys/inotify.h actually works],inotify_works,[
+    AC_RUN_IFELSE(
+      AC_LANG_PROGRAM([[#include <sys/inotify.h>]],
+                      [[return (-1 == inotify_init());]]
+      ),
+      [AC_MSG_RESULT([yup]); AC_DEFINE([SYS_INOTIFY_H_EXISTS_AND_WORKS],[1],[sys/inotify.h exists and works correctly])],
+      [AC_MSG_RESULT([nope, using own inotify headers])]
+    )
+])
 
 
 
