utils/alsa.m4: fix atopology detection without alsatest

Since commit 75d393a563, 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 <fontaine.fabrice@gmail.com>
This commit is contained in:
Fabrice Fontaine 2019-12-04 08:45:45 +01:00
parent 8e2c70add7
commit bdc2218ba7

View file

@ -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])