aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-27 14:33:41 +0100
committerMax Kellermann <max@duempel.org>2008-12-27 14:33:41 +0100
commit0fe0425dee555027c94a39ca0bca5bac947f4702 (patch)
treeb56c3d787c766cda67b29dcd7664dbd516835373 /src/main.c
parent4c13a276c4340752fe955057cbb8cae82163292d (diff)
downloadmpd-0fe0425dee555027c94a39ca0bca5bac947f4702.tar.gz
mpd-0fe0425dee555027c94a39ca0bca5bac947f4702.tar.xz
mpd-0fe0425dee555027c94a39ca0bca5bac947f4702.zip
disable archive API without plugins
When there are no archive plugins, we do not need the archive API at all. Drop all its overhead.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 199d76471..79c9dfa08 100644
--- a/src/main.c
+++ b/src/main.c
@@ -40,7 +40,6 @@
#include "permission.h"
#include "replay_gain.h"
#include "decoder_list.h"
-#include "archive_list.h"
#include "audioOutput.h"
#include "input_stream.h"
#include "state_file.h"
@@ -52,6 +51,10 @@
#include "main_notify.h"
#include "os_compat.h"
+#ifdef ENABLE_ARCHIVE
+#include "archive_list.h"
+#endif
+
#include <glib.h>
#ifdef HAVE_LOCALE
@@ -147,10 +150,12 @@ static void version(void)
"Supported outputs:\n");
printAllOutputPluginTypes(stdout);
+#ifdef ENABLE_ARCHIVE
puts("\n"
"Supported archives:\n");
archive_plugin_init_all();
archive_plugin_print_all_suffixes(stdout);
+#endif
}
static void parseOptions(int argc, char **argv, Options * options)
@@ -421,7 +426,9 @@ int main(int argc, char *argv[])
mapper_init();
initPermissions();
initPlaylist();
+#ifdef ENABLE_ARCHIVE
archive_plugin_init_all();
+#endif
decoder_plugin_init_all();
update_global_init();
@@ -507,7 +514,9 @@ int main(int argc, char *argv[])
command_finish();
update_global_finish();
decoder_plugin_deinit_all();
+#ifdef ENABLE_ARCHIVE
archive_plugin_deinit_all();
+#endif
music_pipe_free();
cleanUpPidFile();
finishConf();