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

@@ -29,7 +29,9 @@
#include "Log.hxx"
#include "stdbin.h"
#ifdef HAVE_GLIB
#include <glib.h>
#endif
#include <assert.h>
#include <unistd.h>
@@ -192,8 +194,10 @@ int main(int argc, char **argv)
decoder_name = argv[1];
decoder.uri = argv[2];
#ifdef HAVE_GLIB
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL);
#endif
#endif
g_log_set_default_handler(my_log_func, NULL);

View File

@@ -33,7 +33,9 @@
#include "ArchiveList.hxx"
#endif
#ifdef HAVE_GLIB
#include <glib.h>
#endif
#include <unistd.h>
#include <stdlib.h>
@@ -120,8 +122,10 @@ int main(int argc, char **argv)
/* initialize GLib */
#ifdef HAVE_GLIB
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL);
#endif
#endif
g_log_set_default_handler(my_log_func, NULL);