From 458fef2e95011c5ac9037f35421ee5262c4da42a Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 25 Jun 2006 15:45:21 +0200 Subject: [PATCH] configfile: Be more verbose if the `Server' or `Local' modes are not available. This happends if not linking against librrd. Some people missed the summary at the end of the configure script and the error message wasn't helping them. --- src/configfile.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/configfile.c b/src/configfile.c index 39265868..40b46fab 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -258,6 +258,27 @@ static int cf_callback_mode (const char *shortvar, const char *var, operating_mode = MODE_SERVER; else if (strcasecmp (value, "Local") == 0) operating_mode = MODE_LOCAL; +#else /* !HAVE_LIBRRD */ + else if (strcasecmp (value, "Server") == 0) + { + fprintf (stderr, "Invalid mode `Server': " + "You need to link against librrd for this " + "mode to be available.\n"); + syslog (LOG_ERR, "Invalid mode `Server': " + "You need to link against librrd for this " + "mode to be available."); + return (LC_CBRET_ERROR); + } + else if (strcasecmp (value, "Local") == 0) + { + fprintf (stderr, "Invalid mode `Local': " + "You need to link against librrd for this " + "mode to be available.\n"); + syslog (LOG_ERR, "Invalid mode `Local': " + "You need to link against librrd for this " + "mode to be available."); + return (LC_CBRET_ERROR); + } #endif else if (strcasecmp (value, "Log") == 0) operating_mode = MODE_LOG; -- 2.30.2