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

@@ -23,7 +23,7 @@
#include "util/Domain.hxx"
#include "LogV.hxx"
#ifdef WIN32
#ifdef HAVE_GLIB
#include <glib.h>
#endif
@@ -78,12 +78,16 @@ FatalError(const char *msg, const Error &error)
FormatFatalError("%s: %s", msg, error.GetMessage());
}
#ifdef HAVE_GLIB
void
FatalError(const char *msg, GError *error)
{
FormatFatalError("%s: %s", msg, error->message);
}
#endif
void
FatalSystemError(const char *msg)
{

View File

@@ -45,9 +45,11 @@ gcc_noreturn
void
FatalError(const char *msg, const Error &error);
#ifdef HAVE_GLIB
gcc_noreturn
void
FatalError(const char *msg, GError *error);
#endif
/**
* Call this after a system call has failed that is not supposed to