selftests: alsa: Handle pkg-config failure more gracefully
Subsystems (3)
Mark Brown
maintainerPATCH 1/1 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 <[email protected]>
--- tools/testing/selftests/alsa/Makefile | 3 +++ 1 file changed, 3 insertions(+)
tools/testing/selftests/alsa/Makefile +3 -0
@@ -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
Signature · 1 line
2.30.2
Takashi Iwai
AppliedQuoted 8 lines · Mark Brown
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 <[email protected]>
Thanks, applied now.
Takashi