From 6a025b97afa44b20dbf5fd64ce61ef9d72b0bb08 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 23 Nov 2012 15:29:21 +0100 Subject: configure: use pkg-config for detecting OpenAL Pick 1.13 as minimal required version. (Arbitrary, but reasonable.) --- configure | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 3b2a8fa0f6..5b2a438132 100755 --- a/configure +++ b/configure @@ -2571,34 +2571,24 @@ else fi echores "$_jack" + echocheck "OpenAL" if test "$_openal" = auto ; then _openal=no -cat > $TMPC << EOF -#ifdef OPENAL_AL_H -#include -#else -#include -#endif -int main(void) { - alSourceQueueBuffers(0, 0, 0); -// alGetSourcei(0, AL_SAMPLE_OFFSET, 0); - return 0; -} -EOF - for I in "-lopenal" "-lopenal32" "-framework OpenAL" ; do - cc_check $I && _openal=yes && break - cc_check -DOPENAL_AL_H=1 $I && def_openal_h='#define OPENAL_AL_H 1' && _openal=yes && break - done - test "$_openal" = yes && libs_mplayer="$libs_mplayer $I" + if pkg_config_add 'openal >= 1.13' ; then + _openal=yes + fi fi +echores "$_openal" + if test "$_openal" = yes ; then def_openal='#define CONFIG_OPENAL 1' aomodules="openal $aomodules" else + def_openal='#undef CONFIG_OPENAL' noaomodules="openal $noaomodules" fi -echores "$_openal" + echocheck "ALSA audio" if test "$_alsa" = auto ; then -- cgit v1.2.3