Skip to content

Commit

Permalink
configure: fix static link with alsa
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
yann-morin-1998 committed Nov 29, 2014
1 parent 2a430ec commit e5a74a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion configure.ac
Expand Up @@ -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
Expand Down

0 comments on commit e5a74a3

Please sign in to comment.