aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorwsnipex <wsnipex@a1.net>2014-02-02 11:05:58 +0100
committerwsnipex <wsnipex@a1.net>2014-02-09 20:34:40 +0100
commit3a21ab3cbcc751c8629a0189644c5139a22748c8 (patch)
treec3c60bc89eac4bcb1710ed84bd0b1e9c90c84a49 /configure.in
parenta75ebdd1ea5e2db91965f4380242bd129ddd25d2 (diff)
[configure] use pkg-config for pulse audio detection
allows to check for minimum required version
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in25
1 files changed, 13 insertions, 12 deletions
diff --git a/configure.in b/configure.in
index 38b94735db..dca7210bf4 100644
--- a/configure.in
+++ b/configure.in
@@ -137,7 +137,7 @@ wayland_disabled="== Wayland disabled. =="
x11_enabled="== X11 enabled. =="
x11_disabled="== X11 disabled. =="
pulse_not_found="== Could not find libpulse. PulseAudio support disabled. =="
-pulse_disabled="== PulseAudio support manually disabled. =="
+pulse_disabled="== PulseAudio support disabled. =="
dvdcss_enabled="== DVDCSS support enabled. =="
dvdcss_disabled="== DVDCSS support disabled. =="
hal_not_found="== Could not find hal. HAL support disabled. =="
@@ -1327,17 +1327,17 @@ if test "x$use_pulse" != "xno"; then
fi
USE_PULSE=0
else
- AC_CHECK_LIB([pulse],[main],,pulse_found="no")
- AC_CHECK_LIB([pulse-simple],[main],,pulse_found="no")
-
- if test "x$pulse_found" != "xno"; then
- USE_PULSE=1
- elif test "x$use_pulse" = "xyes"; then
- AC_MSG_ERROR($pulse_not_found)
- else
- use_pulse=no
- USE_PULSE=0
- AC_MSG_RESULT($pulse_not_found)
+ PKG_CHECK_MODULES([PULSE], [libpulse >= 1.0],
+ [INCLUDES="$INCLUDES $PULSE_CFLAGS"; LIBS="$LIBS $PULSE_LIBS"; USE_PULSE=1;
+ HAVE_LIBPULSE=1; AC_DEFINE([HAVE_LIBPULSE],[1],[Pulse audio enabled])],
+ [pulse_found="no"; USE_PULSE=0; HAVE_LIBPULSE=0])
+
+ if test "$pulse_found" = "no"; then
+ if test "x$use_pulse" = "xyes"; then
+ AC_MSG_ERROR($pulse_not_found)
+ else
+ AC_MSG_RESULT($pulse_disabled)
+ fi
fi
fi
else
@@ -2643,6 +2643,7 @@ AC_SUBST(USE_LIBAFPCLIENT)
AC_SUBST(USE_AIRPLAY)
AC_SUBST(USE_OPENMAX)
AC_SUBST(USE_PULSE)
+AC_SUBST(HAVE_LIBPULSE)
AC_SUBST(USE_XRANDR)
AC_SUBST(USE_ALSA)
AC_SUBST(USE_TEXTUREPACKER)