Support OpenAL headers in OpenAL/ instead of AL/ and OpenAL on MacOSX in general.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21572 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2006-12-10 14:07:08 +00:00
parent 7831dacd5d
commit 7d4e8a36bb
2 changed files with 17 additions and 5 deletions

14
configure vendored
View File

@ -4929,17 +4929,22 @@ echocheck "OpenAL"
if test "$_openal" = auto ; then if test "$_openal" = auto ; then
_openal=no _openal=no
cat > $TMPC << EOF cat > $TMPC << EOF
#ifdef OPENAL_AL_H
#include <OpenAL/al.h>
#else
#include <AL/al.h> #include <AL/al.h>
#endif
int main(void) { int main(void) {
alSourceQueueBuffers(0, 0, 0); alSourceQueueBuffers(0, 0, 0);
// alGetSourcei(0, AL_SAMPLE_OFFSET, 0); // alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
return 0; return 0;
} }
EOF EOF
if cc_check -lopenal ; then for I in "-lopenal" "-framework OpenAL" ; do
_libs_mplayer="$_libs_mplayer -lopenal" cc_check $I && _openal=yes && break
_openal=yes cc_check -DOPENAL_AL_H=1 $I && _def_openal_h='#define OPENAL_AL_H 1' && _openal=yes && break
fi done
test "$_openal" = yes && _libs_mplayer="$_libs_mplayer $I"
fi fi
if test "$_openal" = yes ; then if test "$_openal" = yes ; then
_def_openal='#define USE_OPENAL 1' _def_openal='#define USE_OPENAL 1'
@ -7916,6 +7921,7 @@ $_def_esd_latency
$_def_polyp $_def_polyp
$_def_jack $_def_jack
$_def_openal $_def_openal
$_def_openal_h
$_def_sys_asoundlib_h $_def_sys_asoundlib_h
$_def_alsa_asoundlib_h $_def_alsa_asoundlib_h
$_def_sunaudio $_def_sunaudio

View File

@ -7,13 +7,19 @@
* Copyleft 2006 by Reimar Döffinger (Reimar.Doeffinger@stud.uni-karlsruhe.de) * Copyleft 2006 by Reimar Döffinger (Reimar.Doeffinger@stud.uni-karlsruhe.de)
*/ */
#include "config.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <inttypes.h> #include <inttypes.h>
#ifdef OPENAL_AL_H
#include <OpenAL/alc.h>
#include <OpenAL/al.h>
#else
#include <AL/alc.h> #include <AL/alc.h>
#include <AL/al.h> #include <AL/al.h>
#endif
#include "config.h"
#include "mp_msg.h" #include "mp_msg.h"
#include "help_mp.h" #include "help_mp.h"