configure: fix static link with alsa
Use pkg-config to find the alsa library, that will return all the dependent libraries of alsa (e.g. -ldl -lpthread -lrt) as well that can not be deduced in case of a static link. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit is contained in:
+4
-1
@@ -99,7 +99,10 @@ AC_ARG_WITH(alsa, [ --with-alsa = choose native ALSA API support (GNU/Linux onl
|
||||
HAS_ALSA=1
|
||||
AM_CONDITIONAL([USE_ALSA], [test 0])
|
||||
AC_DEFINE([CONFIG_ALSA], 1, [Needed by the compiler.])
|
||||
AC_CHECK_LIB([asound], [snd_pcm_open], , AC_MSG_ERROR(ALSA support requires the asound library!))], )
|
||||
PKG_CHECK_MODULES(
|
||||
[ALSA], [alsa],
|
||||
[LIBS="${ALSA_LIBS} ${LIBS}"
|
||||
AC_DEFINE([HAVE_LIBASOUND],[1],[Define to 1 if you have ALSA])])])
|
||||
AM_CONDITIONAL([USE_ALSA], [test "x$HAS_ALSA" = "x1"])
|
||||
|
||||
# Look for SNDIO flag
|
||||
|
||||
Reference in New Issue
Block a user