]> git.alsa-project.org Git - alsa-lib.git/commitdiff
mixer: Don't build simple_abst when no libdl is available
authorTakashi Iwai <tiwai@suse.de>
Fri, 7 Dec 2012 08:28:06 +0000 (09:28 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 7 Dec 2012 08:28:06 +0000 (09:28 +0100)
Check BUILD_MODULES conditional not to compile simple_abst.c.
Also return -ENXIO to caller statically in that case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/mixer/Makefile.am
src/mixer/mixer_simple.h

index bb466ed773858512a7d33238757c019ad52a3cf5..c0749a476d7db8a04997e1fdff5dd220781d457c 100644 (file)
@@ -1,6 +1,10 @@
 EXTRA_LTLIBRARIES=libmixer.la
 
-libmixer_la_SOURCES = bag.c mixer.c simple.c simple_none.c simple_abst.c
+libmixer_la_SOURCES = bag.c mixer.c simple.c simple_none.c
+
+if BUILD_MODULES
+libmixer_la_SOURCES += simple_abst.c
+endif
 
 noinst_HEADERS = mixer_local.h mixer_simple.h
 
index e88b00710cd2e2f065c8099e73acb9252b289307..116eebd92f652f7bd4410da66c30def51d78d6cc 100644 (file)
        snd1_mixer_simple_basic_register
 
 int snd_mixer_simple_none_register(snd_mixer_t *mixer, struct snd_mixer_selem_regopt *options, snd_mixer_class_t **classp);
+
+#ifdef HAVE_LIBDL
 int snd_mixer_simple_basic_register(snd_mixer_t *mixer, struct snd_mixer_selem_regopt *options, snd_mixer_class_t **classp);
+#else
+static inline int snd_mixer_simple_basic_register(snd_mixer_t *mixer,
+                                                 struct snd_mixer_selem_regopt *options,
+                                                 snd_mixer_class_t **classp)
+{
+       return -ENXIO;
+}
+#endif