[gtk-vnc] configure: make pulseaudio detection non-automagic
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] configure: make pulseaudio detection non-automagic
- Date: Fri, 6 Apr 2012 09:45:28 +0000 (UTC)
commit ffb183053d258ff5112b2dc7ec78cb83de52e4c0
Author: Alexandre Rostovtsev <tetromino gentoo org>
Date: Fri Apr 6 03:33:41 2012 -0400
configure: make pulseaudio detection non-automagic
This is to allow building gtk-vnc on a system with pulseaudio and then
deploying on a system without pulseaudio.
https://bugzilla.gnome.org/show_bug.cgi?id=673570
configure.ac | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0d5ae35..1e0447a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,11 +213,23 @@ AC_SUBST(VIEW_CFLAGS)
AC_SUBST(VIEW_LIBS)
-PKG_CHECK_MODULES(PULSEAUDIO, libpulse-simple, WANT_PULSEAUDIO="yes", AC_MSG_NOTICE([Not building against libpulse]))
-if test "x$WANT_PULSEAUDIO" = xyes; then
- AC_DEFINE_UNQUOTED([HAVE_PULSEAUDIO], 1,[Define if we have and want pulseaudio.])
+AC_ARG_WITH(pulseaudio,
+ [AS_HELP_STRING([--with-pulseaudio],
+ [use PulseAudio for audio playback @<:@default=check@:>@])],
+ [],
+ [with_pulseaudio=check])
+
+HAVE_PULSEAUDIO=no
+if test "x$with_pulseaudio" != "xno"; then
+ PULSEAUDIO_MODULES=libpulse-simple
+ if test "x$with_pulseaudio" == "xyes"; then
+ PKG_CHECK_MODULES(PULSEAUDIO, $PULSEAUDIO_MODULES, [HAVE_PULSEAUDIO=yes])
+ else
+ PKG_CHECK_MODULES(PULSEAUDIO, $PULSEAUDIO_MODULES, [HAVE_PULSEAUDIO=yes],
+ [AC_MSG_NOTICE([libpulse-simple not found, disabling PulseAudio support])])
+ fi
fi
-AM_CONDITIONAL([HAVE_PULSEAUDIO], [test "x$WANT_PULSEAUDIO" = "xyes"])
+AM_CONDITIONAL([HAVE_PULSEAUDIO], [test "x$HAVE_PULSEAUDIO" = "xyes"])
AC_SUBST(PULSEAUDIO_CFLAGS)
AC_SUBST(PULSEAUDIO_LIBS)
@@ -484,5 +496,6 @@ Configure summary:
Install example programs ...: ${WITH_EXAMPLES}
Browser plugin .............: ${enable_plugin}
SASL support................: ${enable_sasl}
+ PulseAudio support..........: ${HAVE_PULSEAUDIO}
GTK+ version................: ${GTK_API_VERSION}
"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]