Commit 102a52e4712aeac3bad0ed25755ff2c96f4ff794
1 parent
c76338c3
FMOD configure options (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1147 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
27 additions
and
12 deletions
Makefile.target
1 | 1 | include config.mak |
2 | 2 | |
3 | -#Uncomment following and specify proper paths/names for FMOD support | |
4 | -#USE_FMOD=1 | |
5 | -#FMOD_INCLUDE=/net/include/fmod | |
6 | -#FMOD_LIBPATH=/net/lib | |
7 | -#FMOD_VERSION=3.74 | |
8 | - | |
9 | 3 | TARGET_PATH=$(SRC_PATH)/target-$(TARGET_ARCH) |
10 | 4 | VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio |
11 | 5 | DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH) |
... | ... | @@ -288,11 +282,10 @@ ifdef CONFIG_ADLIB |
288 | 282 | SOUND_HW += fmopl.o adlib.o |
289 | 283 | endif |
290 | 284 | |
291 | -ifeq ($(USE_FMOD),1) | |
285 | +ifdef CONFIG_FMOD | |
292 | 286 | AUDIODRV += fmodaudio.o |
293 | -audio.o fmodaudio.o: DEFINES := -DUSE_FMOD_AUDIO -I$(FMOD_INCLUDE) $(DEFINES) | |
294 | -LDFLAGS += -L$(FMOD_LIBPATH) -Wl,-rpath,$(FMOD_LIBPATH) | |
295 | -LIBS += -lfmod-$(FMOD_VERSION) | |
287 | +audio.o fmodaudio.o: DEFINES := -I$(CONFIG_FMOD_INC) $(DEFINES) | |
288 | +LIBS += $(CONFIG_FMOD_LIB) | |
296 | 289 | endif |
297 | 290 | |
298 | 291 | ifeq ($(TARGET_ARCH), i386) | ... | ... |
audio/audio.c
... | ... | @@ -24,7 +24,6 @@ |
24 | 24 | #include <assert.h> |
25 | 25 | #include "vl.h" |
26 | 26 | |
27 | -#define USE_SDL_AUDIO | |
28 | 27 | #define USE_WAV_AUDIO |
29 | 28 | |
30 | 29 | #include "audio/audio_int.h" |
... | ... | @@ -779,7 +778,7 @@ static struct audio_output_driver *drvtab[] = { |
779 | 778 | #ifdef CONFIG_OSS |
780 | 779 | &oss_output_driver, |
781 | 780 | #endif |
782 | -#ifdef USE_FMOD_AUDIO | |
781 | +#ifdef CONFIG_FMOD | |
783 | 782 | &fmod_output_driver, |
784 | 783 | #endif |
785 | 784 | #ifdef CONFIG_SDL | ... | ... |
configure
... | ... | @@ -74,6 +74,9 @@ gdbstub="yes" |
74 | 74 | slirp="yes" |
75 | 75 | adlib="no" |
76 | 76 | oss="no" |
77 | +fmod="no" | |
78 | +fmod_lib="" | |
79 | +fmod_inc="" | |
77 | 80 | |
78 | 81 | # OS specific |
79 | 82 | targetos=`uname -s` |
... | ... | @@ -150,6 +153,12 @@ for opt do |
150 | 153 | ;; |
151 | 154 | --disable-sdl) sdl="no" |
152 | 155 | ;; |
156 | + --enable-fmod) fmod="yes" | |
157 | + ;; | |
158 | + --fmod-lib=*) fmod_lib=${opt#--fmod-lib=} | |
159 | + ;; | |
160 | + --fmod-inc=*) fmod_inc=${opt#--fmod-inc=} | |
161 | + ;; | |
153 | 162 | --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" |
154 | 163 | ;; |
155 | 164 | --disable-slirp) slirp="no" |
... | ... | @@ -285,6 +294,9 @@ echo " --cc=CC use C compiler CC [$cc]" |
285 | 294 | echo " --make=MAKE use specified make [$make]" |
286 | 295 | echo " --static enable static build [$static]" |
287 | 296 | echo " --enable-mingw32 enable Win32 cross compilation with mingw32" |
297 | +echo " --enable-fmod enable FMOD audio output driver" | |
298 | +echo " --fmod-lib path to FMOD library" | |
299 | +echo " --fmod-inc path to FMOD includes" | |
288 | 300 | echo "" |
289 | 301 | echo "NOTE: The object files are build at the place where configure is launched" |
290 | 302 | exit 1 |
... | ... | @@ -327,6 +339,11 @@ echo "SDL support $sdl" |
327 | 339 | echo "SDL static link $sdl_static" |
328 | 340 | echo "mingw32 support $mingw32" |
329 | 341 | echo "Adlib support $adlib" |
342 | +echo -n "FMOD support $fmod" | |
343 | +if test $fmod = "yes"; then | |
344 | + echo -n " (lib='$fmod_lib' include='$fmod_inc')" | |
345 | +fi | |
346 | +echo "" | |
330 | 347 | |
331 | 348 | if test $sdl_too_old = "yes"; then |
332 | 349 | echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support" |
... | ... | @@ -435,6 +452,12 @@ if test "$oss" = "yes" ; then |
435 | 452 | echo "CONFIG_OSS=yes" >> $config_mak |
436 | 453 | echo "#define CONFIG_OSS 1" >> $config_h |
437 | 454 | fi |
455 | +if test "$fmod" = "yes" ; then | |
456 | + echo "CONFIG_FMOD=yes" >> $config_mak | |
457 | + echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak | |
458 | + echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak | |
459 | + echo "#define CONFIG_FMOD 1" >> $config_h | |
460 | +fi | |
438 | 461 | echo -n "VERSION=" >>$config_mak |
439 | 462 | head $source_path/VERSION >>$config_mak |
440 | 463 | echo "" >>$config_mak | ... | ... |