Fix OpenAL build for OSX.

This commit is contained in:
Themaister 2011-02-04 07:42:26 -06:00
parent 9ad9cbd7de
commit 57eebebcdd
3 changed files with 18 additions and 1 deletions

View File

@ -36,8 +36,12 @@ ifeq ($(HAVE_ROAR), 1)
endif
ifeq ($(HAVE_AL), 1)
OBJ += audio/openal.o
ifneq ($(findstring Darwin,$(shell uname -a)),)
LIBS += -framework OpenAL
else
LIBS += -lopenal
endif
endif
ifeq ($(HAVE_JACK),1)
OBJ += audio/jack.o
LIBS += -ljack

View File

@ -17,8 +17,15 @@
#include "driver.h"
#ifdef __APPLE__
#include <OpenAL/al.h>
#include <OpenAL/alc.h>
#else
#include <AL/al.h>
#include <AL/alc.h>
#endif
#include <time.h>
#include <string.h>

View File

@ -17,7 +17,13 @@ fi
check_lib ALSA -lasound snd_pcm_open
check_header OSS sys/soundcard.h
check_lib AL -lopenal alcOpenDevice
if [ "$OS" = "Darwin" ]; then
check_lib AL "-framework OpenAL" alcOpenDevice
else
check_lib AL -lopenal alcOpenDevice
fi
check_lib RSOUND -lrsound rsd_init
check_lib ROAR -lroar roar_vs_new
check_lib JACK -ljack jack_client_open