]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
selftests: alsa: Handle pkg-config failure more gracefully
authorMark Brown <broonie@kernel.org>
Tue, 31 May 2022 15:13:37 +0000 (17:13 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 31 May 2022 16:02:18 +0000 (18:02 +0200)
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>
tools/testing/selftests/alsa/Makefile

index f64d9090426d21f575d1ba478328fc456406e470..fd8ddce2b1a6e8cce8267c681612fe35fb0be00a 100644 (file)
@@ -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