summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-05-31 17:13:37 +0200
committerTakashi Iwai <tiwai@suse.de>2022-05-31 18:02:18 +0200
commit079d93b7dba8373920ad8b50e01616ce8ab3c927 (patch)
tree14a45ac16fc1be3537ce2c05d53e084f42f683f0 /tools
parent3753fcc22974affa26160ce1c46a6ebaaaa86758 (diff)
selftests: alsa: Handle pkg-config failure more gracefully
Follow the pattern used by other selftests like memfd and fall back on the standard toolchain options to build with a system installed alsa-lib if we don't get anything from pkg-config. This reduces our build dependencies a bit in the common case while still allowing use of pkg-config in case there is a need for it. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220531151337.2933810-1-broonie@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/alsa/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/alsa/Makefile b/tools/testing/selftests/alsa/Makefile
index f64d9090426d..fd8ddce2b1a6 100644
--- a/tools/testing/selftests/alsa/Makefile
+++ b/tools/testing/selftests/alsa/Makefile
@@ -3,6 +3,9 @@
CFLAGS += $(shell pkg-config --cflags alsa)
LDLIBS += $(shell pkg-config --libs alsa)
+ifeq ($(LDLIBS),)
+LDLIBS += -lasound
+endif
TEST_GEN_PROGS := mixer-test