summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2010-12-15 16:00:14 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2010-12-17 19:37:08 +0100
commitd1a0fe05c723f035846a61c0aa5b4979ad513e69 (patch)
treecefe99cc095ef4014e96898433a3aa7dc656f7ee /configure.ac
parentde0daa3f666b1403a9e357dc74c2fd461f9de6ca (diff)
gtk: make pulse audio backend optional
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 15 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 413bbd0..8f974ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -141,7 +141,20 @@ PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.10.0)
AC_SUBST(GIO_CFLAGS)
AC_SUBST(GIO_LIBS)
-PKG_CHECK_MODULES(PULSE, libpulse libpulse-mainloop-glib)
+AC_ARG_WITH([pulse],
+ AS_HELP_STRING([--without-pulse], [Ignore presence of PulseAudio and disable it]))
+
+AS_IF([test "x$with_pulse" != "xno"],
+ [PKG_CHECK_MODULES(PULSE, libpulse libpulse-mainloop-glib, [have_pulse=yes], [have_pulse=no])],
+ [have_pulse=no])
+
+AS_IF([test "x$have_pulse" = "xyes"],
+ [AC_DEFINE([HAVE_PULSE], 1, [Have pulseaudio?])],
+ [AS_IF([test "x$with_pulse" = "xyes"],
+ [AC_MSG_ERROR([PulseAudio requested but not found])
+ ])
+])
+AM_CONDITIONAL([HAVE_PULSE], [test "x$have_pulse" = "xyes"])
AC_SUBST(PULSE_CFLAGS)
AC_SUBST(PULSE_LIBS)
@@ -201,7 +214,7 @@ if test "$with_coroutine" = "ucontext"; then
fi
if test "$with_coroutine" = "gthread"; then
- PKG_CHECK_MODULES(GTHREAD, gthread-2.0 > $GTHREAD_REQUIRED)
+ PKG_CHECK_MODULES(GTHREAD, gthread-2.0 > 2.0.0)
WITH_UCONTEXT=0
fi
AC_SUBST(GTHREAD_CFLAGS)