add --disable option inotify
authorDana Jansens <danakj@orodu.net>
Mon, 4 Oct 2010 22:03:36 +0000 (18:03 -0400)
committerDana Jansens <danakj@orodu.net>
Wed, 3 Aug 2011 21:44:55 +0000 (17:44 -0400)
so we can test compiling without it present

configure.ac

index 49362e435e9823d6bc5feae072dd42efd301e1a8..0893bbb6b1ce3a10eb019dccb8b3a0ae21b849eb 100644 (file)
@@ -90,7 +90,18 @@ AM_GNU_GETTEXT([external])
 AC_CHECK_HEADERS(ctype.h dirent.h errno.h fcntl.h grp.h locale.h pwd.h)
 AC_CHECK_HEADERS(signal.h string.h stdio.h stdlib.h unistd.h sys/stat.h)
 AC_CHECK_HEADERS(sys/select.h sys/socket.h sys/time.h sys/types.h sys/wait.h)
-AC_CHECK_HEADERS(sys/inotify.h)
+
+AC_ARG_ENABLE(inotify,
+  AC_HELP_STRING(
+    [--disable-inotify],
+    [disable inotify support [default=enabled]]
+  ),
+  [enable_inotify=$enableval],
+  [enable_inotify=yes]
+)
+if test "$enable_inotify" = yes; then
+  AC_CHECK_HEADERS(sys/inotify.h)
+fi
 
 AC_PATH_PROG([SED], [sed], [no])
 if test "$SED" = "no"; then