aboutsummaryrefslogtreecommitdiffstats
path: root/modules/bogofilter
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-08-20 22:13:57 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-10-01 11:26:23 +0800
commitb46da7735a5f58c3477f7725d88f4374a9c5dd84 (patch)
tree6762f84154641f82408f461aa532720c1f9a20ec /modules/bogofilter
parent5c4a1dbf39b5c3717e080833c4f887660dc1aefa (diff)
downloadgsoc2013-evolution-b46da7735a5f58c3477f7725d88f4374a9c5dd84.tar
gsoc2013-evolution-b46da7735a5f58c3477f7725d88f4374a9c5dd84.tar.gz
gsoc2013-evolution-b46da7735a5f58c3477f7725d88f4374a9c5dd84.tar.bz2
gsoc2013-evolution-b46da7735a5f58c3477f7725d88f4374a9c5dd84.tar.lz
gsoc2013-evolution-b46da7735a5f58c3477f7725d88f4374a9c5dd84.tar.xz
gsoc2013-evolution-b46da7735a5f58c3477f7725d88f4374a9c5dd84.tar.zst
gsoc2013-evolution-b46da7735a5f58c3477f7725d88f4374a9c5dd84.zip
Check for Bogofilter during configure.
If the bogofilter program cannot be found with AC_PATH_PROG, configure will abort with an error message. You can then either: a) install the Bogofilter software b) specify the path with BOGOFILTER=/path/to/bogofilter c) pass --disable-bogofilter to configure to exclude the module
Diffstat (limited to 'modules/bogofilter')
-rw-r--r--modules/bogofilter/evolution-bogofilter.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/modules/bogofilter/evolution-bogofilter.c b/modules/bogofilter/evolution-bogofilter.c
index 933fa6f774..f48658055b 100644
--- a/modules/bogofilter/evolution-bogofilter.c
+++ b/modules/bogofilter/evolution-bogofilter.c
@@ -36,10 +36,6 @@
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_BOGOFILTER, EBogofilter))
-#ifndef BOGOFILTER_BINARY
-#define BOGOFILTER_BINARY "/usr/bin/bogofilter"
-#endif
-
#define BOGOFILTER_EXIT_STATUS_SPAM 0
#define BOGOFILTER_EXIT_STATUS_HAM 1
#define BOGOFILTER_EXIT_STATUS_UNSURE 2
@@ -302,7 +298,7 @@ bogofilter_get_property (GObject *object,
static gboolean
bogofilter_available (EMailJunkFilter *junk_filter)
{
- return g_file_test (BOGOFILTER_BINARY, G_FILE_TEST_IS_EXECUTABLE);
+ return g_file_test (BOGOFILTER_COMMAND, G_FILE_TEST_IS_EXECUTABLE);
}
static GtkWidget *
@@ -350,7 +346,7 @@ bogofilter_classify (CamelJunkFilter *junk_filter,
gint exit_code;
const gchar *argv[] = {
- BOGOFILTER_BINARY,
+ BOGOFILTER_COMMAND,
NULL, /* leave room for unicode option */
NULL
};
@@ -408,7 +404,7 @@ bogofilter_learn_junk (CamelJunkFilter *junk_filter,
gint exit_code;
const gchar *argv[] = {
- BOGOFILTER_BINARY,
+ BOGOFILTER_COMMAND,
"--register-spam",
NULL, /* leave room for unicode option */
NULL
@@ -443,7 +439,7 @@ bogofilter_learn_not_junk (CamelJunkFilter *junk_filter,
gint exit_code;
const gchar *argv[] = {
- BOGOFILTER_BINARY,
+ BOGOFILTER_COMMAND,
"--register-ham",
NULL, /* leave room for unicode option */
NULL