Commit 8e1d1df0 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Use pkgconfig to detect alsa

parent b6c2c6bc
......@@ -4773,27 +4773,26 @@ dnl ALSA module
dnl
AC_ARG_ENABLE(alsa,
[ --enable-alsa ALSA sound support for Linux (default enabled)])
if test "${enable_alsa}" != "no"
then
AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
if test "${have_alsa}" = "true"
then
CFLAGS="${CFLAGS_save}"
AC_TRY_COMPILE([#define ALSA_PCM_NEW_HW_PARAMS_API
#define ALSA_PCM_NEW_SW_PARAMS_API
#include <alsa/asoundlib.h>],
[snd_pcm_hw_params_get_period_time(0,0,0);],
AC_DEFINE(HAVE_ALSA_NEW_API, 1, Define if ALSA is at least rc4))
VLC_ADD_PLUGIN([alsa])
VLC_ADD_LIBS([alsa],[-lasound -lm -ldl])
VLC_ADD_PLUGIN([access_alsa])
VLC_ADD_LIBS([access_alsa],[-lasound -lm -ldl])
else
if test "${enable_alsa}" = "yes"; then
AC_MSG_ERROR([Could not find ALSA development headers])
fi
fi
fi
if test "${enable_alsa}" != "no"
then
PKG_CHECK_MODULES(ALSA, alsa >= 1.0.21a,
[ VLC_ADD_PLUGIN([alsa])
VLC_ADD_CFLAGS([alsa],[${ALSA_CFLAGS}])
VLC_ADD_LIBS([alsa],[${ALSA_LIBS} -lm -ldl])
VLC_ADD_LDFLAGS([alsa],[${ALSA_LDFLAGS}])
VLC_ADD_PLUGIN([access_alsa])
VLC_ADD_CFLAGS([access_alsa],[${ALSA_CFLAGS}])
VLC_ADD_LIBS([access_alsa],[${ALSA_LIBS} -lm -ldl])
VLC_ADD_LDFLAGS([access_alsa],[${ALSA_LDFLAGS}])
AC_TRY_COMPILE([#define ALSA_PCM_NEW_HW_PARAMS_API
#define ALSA_PCM_NEW_SW_PARAMS_API
#include <alsa/asoundlib.h>],
[snd_pcm_hw_params_get_period_time(0,0,0);],
AC_DEFINE(HAVE_ALSA_NEW_API, 1, Define if ALSA is at least rc4))
],
[AC_MSG_WARN(ALSA development headers and library not fond)])
fi
dnl
dnl win32 waveOut plugin
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment