pulseaudio: normalize alsa-lib optional dependency
authorBaruch Siach <baruch@tkos.co.il>
Wed, 20 Dec 2017 16:02:50 +0000 (18:02 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 20 Dec 2017 20:37:16 +0000 (21:37 +0100)
Put together alsa-lib dependency and configure option code. As a side
effect we now avoid alsa-lib dependency when the required support in
alsa is missing.

Use positive logic.

Explicitly enable alsa support when available.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/pulseaudio/pulseaudio.mk

index a30d5401bae2b0710ae92af47a6eb0d7a344cafd..3863557881e5c0492c1ade0b14c69aee8751dca0 100644 (file)
@@ -18,7 +18,6 @@ PULSEAUDIO_CONF_OPTS = \
 PULSEAUDIO_DEPENDENCIES = \
        host-pkgconf libtool libsndfile speex host-intltool \
        $(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) \
-       $(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib) \
        $(if $(BR2_PACKAGE_LIBGLIB2),libglib2) \
        $(if $(BR2_PACKAGE_AVAHI_DAEMON),avahi) \
        $(if $(BR2_PACKAGE_DBUS),dbus) \
@@ -119,7 +118,10 @@ PULSEAUDIO_CONF_OPTS += --enable-neon-opt=no
 endif
 
 # pulseaudio alsa backend needs pcm/mixer apis
-ifneq ($(BR2_PACKAGE_ALSA_LIB_PCM)$(BR2_PACKAGE_ALSA_LIB_MIXER),yy)
+ifeq ($(BR2_PACKAGE_ALSA_LIB_PCM)$(BR2_PACKAGE_ALSA_LIB_MIXER),yy)
+PULSEAUDIO_DEPENDENCIES += alsa-lib
+PULSEAUDIO_CONF_OPTS += --enable-alsa
+else
 PULSEAUDIO_CONF_OPTS += --disable-alsa
 endif