]> git.alsa-project.org Git - alsa-lib.git/commitdiff
alsa.m4: another try to fix the libatopology detection
authorJaroslav Kysela <perex@perex.cz>
Wed, 4 Dec 2019 08:49:40 +0000 (09:49 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 4 Dec 2019 08:50:27 +0000 (09:50 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
utils/alsa.m4

index 4c457f0d4e1d592288c3369cf96f45c1f6144cc5..320e4336a925bc7e2ebe4c585d7ebc0371ba7234 100644 (file)
@@ -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)