From bdc2218ba7c6ba712c976e664a9425b2cfde2dce Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Wed, 4 Dec 2019 08:45:45 +0100 Subject: [PATCH] utils/alsa.m4: fix atopology detection without alsatest Since commit 75d393a563efb578c79364a277087c6326267f52, alsa-utils fails to build with --disable-alsatest because atopology is not detected Fixes: - http://autobuild.buildroot.org/results/d0fb760669b02b813115af04adcf24530d35f4e1 Signed-off-by: Fabrice Fontaine --- utils/alsa.m4 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/utils/alsa.m4 b/utils/alsa.m4 index 4c457f0d..5a197b29 100644 --- a/utils/alsa.m4 +++ b/utils/alsa.m4 @@ -124,6 +124,15 @@ exit(0); alsa_found=no] ) AC_LANG_RESTORE +fi + +dnl Now that we know that we have the right version, let's see if we have the library and not just the headers. +if test "x$enable_alsatest" = "xyes"; then +AC_CHECK_LIB([asound], [snd_ctl_open],, + [ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)]) + alsa_found=no] +) +fi AC_LANG_SAVE AC_LANG_C @@ -149,21 +158,12 @@ exit(0); ) AC_LANG_RESTORE -fi - -dnl Now that we know that we have the right version, let's see if we have the library and not just the headers. -if test "x$enable_alsatest" = "xyes"; then -AC_CHECK_LIB([asound], [snd_ctl_open],, - [ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)]) - alsa_found=no] -) if test "x$enable_atopology" = "xyes"; then AC_CHECK_LIB([atopology], [snd_tplg_new],, [ifelse([$3], , [AC_MSG_ERROR(No linkable libatopology was found.)]) alsa_found=no] ) fi -fi if test "x$alsa_found" = "xyes" ; then ifelse([$2], , :, [$2])