1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
--- gamin-0.0.10/configure.in 2004-09-21 21:16:53.608085112 +0200
+++ gamin-0.0.10.az/configure.in 2004-09-21 21:49:59.739147296 +0200
@@ -169,11 +169,19 @@ AM_CONDITIONAL(HAVE_LINUX, test x$os = x
if test x$os = xlinux-gnu; then
AC_DEFINE([HAVE_LINUX],[],[Whether we are using linux or not])
+
+ # We enable dnotify no matter what. If the user enables
+ # inotify, he will still have dnotify to fall back on ...
+ AC_DEFINE(ENABLE_DNOTIFY,1,[Use dnotify as backend])
backend="dnotify"
else
backend="polling"
fi
+# We do not care about inotify for now - if the user enables
+# it, we still want to build dnotify support ...
+AM_CONDITIONAL(ENABLE_DNOTIFY, test x$backend = xdnotify)
+
AC_ARG_ENABLE(inotify,
[ --enable-inotify Uses inotify as backend],
[case "${enableval}" in
@@ -184,17 +192,14 @@ esac])
if test x$backend = xinotify; then
AC_DEFINE(ENABLE_INOTIFY,1,[Use inotify as backend])
-else
- if test x$backend = xdnotify; then
- AC_DEFINE(ENABLE_DNOTIFY,1,[Use dnotify as backend])
- else if test x$backend = xpolling; then
- AC_DEFINE(ENABLE_POLLING,1,[Use polling as backend])
- fi
+else
+ # If all else fails, use polling
+ if test x$backend = xpolling; then
+ AC_DEFINE(ENABLE_POLLING,1,[Use polling as backend])
fi
fi
AM_CONDITIONAL(ENABLE_INOTIFY, test x$backend = xinotify)
-AM_CONDITIONAL(ENABLE_DNOTIFY, test x$backend = xdnotify)
dnl check for flavours of varargs macros (test from GLib)
AC_MSG_CHECKING(for ISO C99 varargs macros in C)
--- gamin-0.0.10/server/gam_excludes.c 2004-09-21 21:44:04.466157000 +0200
+++ gamin-0.0.10.az/server/gam_excludes.c 2004-09-21 21:48:36.589787920 +0200
@@ -19,7 +19,7 @@ struct _gam_exclude {
static int initialized = 0;
static GList *excludes = NULL;
static char *static_excludes[] = {
-#ifdef linux
+#ifdef HAVE_LINUX
"/media/*",
"/mnt/*",
#endif
--- gamin-0.0.10/server/gam_server.c 2004-09-21 21:19:34.375644728 +0200
+++ gamin-0.0.10.az/server/gam_server.c 2004-09-21 21:31:33.929255952 +0200
@@ -36,7 +36,7 @@
#ifdef ENABLE_INOTIFY
#include "gam_inotify.h"
#endif
-#ifdef linux
+#ifdef ENABLE_DNOTIFY
#include "gam_dnotify.h"
#endif
#include "gam_excludes.h"
@@ -72,7 +72,7 @@ gam_init_subscriptions(void)
return(TRUE);
}
#endif
-#ifdef linux
+#ifdef ENABLE_DNOTIFY
if (gam_dnotify_init()) {
gam_debug(DEBUG_INFO, "Using DNotify as backend\n");
return(TRUE);
|