From ad8527d81b09c4d0edd054b5b1468ce1c50b23cb Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 4 Dec 2019 09:49:40 +0100 Subject: [PATCH] alsa.m4: another try to fix the libatopology detection Signed-off-by: Jaroslav Kysela --- utils/alsa.m4 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/utils/alsa.m4 b/utils/alsa.m4 index 4c457f0d..320e4336 100644 --- a/utils/alsa.m4 +++ b/utils/alsa.m4 @@ -22,6 +22,7 @@ alsa_save_CFLAGS="$CFLAGS" alsa_save_LDFLAGS="$LDFLAGS" alsa_save_LIBS="$LIBS" alsa_found=yes +alsa_topology_found=no dnl dnl Get the cflags and libraries for alsa @@ -158,11 +159,17 @@ AC_CHECK_LIB([asound], [snd_ctl_open],, alsa_found=no] ) if test "x$enable_atopology" = "xyes"; then +alsa_topology_found=yes AC_CHECK_LIB([atopology], [snd_tplg_new],, [ifelse([$3], , [AC_MSG_ERROR(No linkable libatopology was found.)]) - alsa_found=no] + alsa_topology_found=no, +] ) fi +else +if test "x$enable_atopology" = "xyes"; then + alsa_topology_found=yes +fi fi if test "x$alsa_found" = "xyes" ; then @@ -183,7 +190,7 @@ fi dnl add the alsa topology library; must be at the end AC_MSG_CHECKING(for ALSA topology LDFLAGS) -if test "x$enable_atopology" = "xyes"; then +if test "x$alsa_topology_found" = "xyes"; then ALSA_TOPOLOGY_LIBS="$ALSA_TOPOLOGY_LIBS -latopology" fi AC_MSG_RESULT($ALSA_TOPOLOGY_LIBS) -- 2.47.3