configure.ac: add option "--disable-glib"

Allows building without GLib.  This fails to compile currently,
because GLib is still used in the MPD core.
This commit is contained in:
Max Kellermann
2013-12-15 12:32:15 +01:00
parent 0db0b4e302
commit d5dfe7d457
10 changed files with 70 additions and 15 deletions

View File

@@ -79,7 +79,9 @@
#include "ArchiveList.hxx"
#endif
#ifdef HAVE_GLIB
#include <glib.h>
#endif
#include <stdlib.h>
@@ -92,6 +94,8 @@
#include <ws2tcpip.h>
#endif
#include <limits.h>
static constexpr unsigned DEFAULT_BUFFER_SIZE = 4096;
static constexpr unsigned DEFAULT_BUFFER_BEFORE_PLAY = 10;
@@ -359,11 +363,13 @@ int mpd_main(int argc, char *argv[])
setlocale(LC_CTYPE,"");
#endif
#ifdef HAVE_GLIB
g_set_application_name("Music Player Daemon");
#if !GLIB_CHECK_VERSION(2,32,0)
/* enable GLib's thread safety code */
g_thread_init(nullptr);
#endif
#endif
winsock_init();
@@ -473,7 +479,7 @@ int mpd_main(int argc, char *argv[])
}
if (!glue_state_file_init(error)) {
g_printerr("%s\n", error.GetMessage());
LogError(error);
return EXIT_FAILURE;
}