aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-15 12:32:15 +0100
committerMax Kellermann <max@duempel.org>2013-12-15 18:43:12 +0100
commitd5dfe7d457b559bd9c53d65d0315c55611cc6a79 (patch)
tree42825c13cc44e4fe1272d14f9dc26f03ce0ef596 /configure.ac
parent0db0b4e302f82165b763da7717059911a85c370f (diff)
downloadmpd-d5dfe7d457b559bd9c53d65d0315c55611cc6a79.tar.gz
mpd-d5dfe7d457b559bd9c53d65d0315c55611cc6a79.tar.xz
mpd-d5dfe7d457b559bd9c53d65d0315c55611cc6a79.zip
configure.ac: add option "--disable-glib"
Allows building without GLib. This fails to compile currently, because GLib is still used in the MPD core.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 15 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 1e3dfb098..b789d02d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -547,13 +547,24 @@ AC_ARG_WITH(tremor-includes,
dnl ---------------------------------------------------------------------------
dnl Mandatory Libraries
dnl ---------------------------------------------------------------------------
-PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.28 gthread-2.0],,
+
+AC_ARG_ENABLE(glib,
+ AS_HELP_STRING([--enable-glib],
+ [enable GLib usage (default: enabled)]),,
+ enable_glib=yes)
+
+if test x$enable_glib = xyes; then
+ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.28 gthread-2.0],,
[AC_MSG_ERROR([GLib 2.28 is required])])
-if test x$GCC = xyes; then
- # suppress warnings in the GLib headers
- GLIB_CFLAGS=`echo $GLIB_CFLAGS |sed -e 's,-I/,-isystem /,g'`
+ if test x$GCC = xyes; then
+ # suppress warnings in the GLib headers
+ GLIB_CFLAGS=`echo $GLIB_CFLAGS |sed -e 's,-I/,-isystem /,g'`
+ fi
+
+ AC_DEFINE(HAVE_GLIB, 1, [Define if GLib is used])
fi
+AM_CONDITIONAL(HAVE_GLIB, test x$enable_glib = xyes)
dnl ---------------------------------------------------------------------------
dnl Protocol Options