* [PATCH] selftests: alsa: Handle pkg-config failure more gracefully
@ 2022-05-31 15:13 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2022-05-31 15:13 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, Shuah Khan
Cc: alsa-devel, linux-kselftest, 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 <broonie@kernel.org>
---
tools/testing/selftests/alsa/Makefile | 3 +++
1 file changed, 3 insertions(+)
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
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] selftests: alsa: Handle pkg-config failure more gracefully
@ 2022-05-31 15:13 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2022-05-31 15:13 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, Shuah Khan
Cc: alsa-devel, Mark Brown, linux-kselftest
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>
---
tools/testing/selftests/alsa/Makefile | 3 +++
1 file changed, 3 insertions(+)
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
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests: alsa: Handle pkg-config failure more gracefully
2022-05-31 15:13 ` Mark Brown
@ 2022-05-31 16:02 ` Takashi Iwai
-1 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2022-05-31 16:02 UTC (permalink / raw)
To: Mark Brown
Cc: Jaroslav Kysela, Takashi Iwai, Shuah Khan, alsa-devel, linux-kselftest
On Tue, 31 May 2022 17:13:37 +0200,
Mark Brown wrote:
>
> 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>
Thanks, applied now.
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests: alsa: Handle pkg-config failure more gracefully
@ 2022-05-31 16:02 ` Takashi Iwai
0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2022-05-31 16:02 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Shuah Khan, Takashi Iwai, linux-kselftest
On Tue, 31 May 2022 17:13:37 +0200,
Mark Brown wrote:
>
> 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>
Thanks, applied now.
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-31 16:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-31 15:13 [PATCH] selftests: alsa: Handle pkg-config failure more gracefully Mark Brown
2022-05-31 15:13 ` Mark Brown
2022-05-31 16:02 ` Takashi Iwai
2022-05-31 16:02 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.