Commit 102a52e4712aeac3bad0ed25755ff2c96f4ff794

Authored by bellard
1 parent c76338c3

FMOD configure options (malc)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1147 c046a42c-6fe2-441c-8c8c-71466251a162
Makefile.target
1 include config.mak 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 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_ARCH) 3 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_ARCH)
10 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio 4 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio
11 DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH) 5 DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH)
@@ -288,11 +282,10 @@ ifdef CONFIG_ADLIB @@ -288,11 +282,10 @@ ifdef CONFIG_ADLIB
288 SOUND_HW += fmopl.o adlib.o 282 SOUND_HW += fmopl.o adlib.o
289 endif 283 endif
290 284
291 -ifeq ($(USE_FMOD),1) 285 +ifdef CONFIG_FMOD
292 AUDIODRV += fmodaudio.o 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 endif 289 endif
297 290
298 ifeq ($(TARGET_ARCH), i386) 291 ifeq ($(TARGET_ARCH), i386)
audio/audio.c
@@ -24,7 +24,6 @@ @@ -24,7 +24,6 @@
24 #include <assert.h> 24 #include <assert.h>
25 #include "vl.h" 25 #include "vl.h"
26 26
27 -#define USE_SDL_AUDIO  
28 #define USE_WAV_AUDIO 27 #define USE_WAV_AUDIO
29 28
30 #include "audio/audio_int.h" 29 #include "audio/audio_int.h"
@@ -779,7 +778,7 @@ static struct audio_output_driver *drvtab[] = { @@ -779,7 +778,7 @@ static struct audio_output_driver *drvtab[] = {
779 #ifdef CONFIG_OSS 778 #ifdef CONFIG_OSS
780 &oss_output_driver, 779 &oss_output_driver,
781 #endif 780 #endif
782 -#ifdef USE_FMOD_AUDIO 781 +#ifdef CONFIG_FMOD
783 &fmod_output_driver, 782 &fmod_output_driver,
784 #endif 783 #endif
785 #ifdef CONFIG_SDL 784 #ifdef CONFIG_SDL
configure
@@ -74,6 +74,9 @@ gdbstub=&quot;yes&quot; @@ -74,6 +74,9 @@ gdbstub=&quot;yes&quot;
74 slirp="yes" 74 slirp="yes"
75 adlib="no" 75 adlib="no"
76 oss="no" 76 oss="no"
  77 +fmod="no"
  78 +fmod_lib=""
  79 +fmod_inc=""
77 80
78 # OS specific 81 # OS specific
79 targetos=`uname -s` 82 targetos=`uname -s`
@@ -150,6 +153,12 @@ for opt do @@ -150,6 +153,12 @@ for opt do
150 ;; 153 ;;
151 --disable-sdl) sdl="no" 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 --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" 162 --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-"
154 ;; 163 ;;
155 --disable-slirp) slirp="no" 164 --disable-slirp) slirp="no"
@@ -285,6 +294,9 @@ echo &quot; --cc=CC use C compiler CC [$cc]&quot; @@ -285,6 +294,9 @@ echo &quot; --cc=CC use C compiler CC [$cc]&quot;
285 echo " --make=MAKE use specified make [$make]" 294 echo " --make=MAKE use specified make [$make]"
286 echo " --static enable static build [$static]" 295 echo " --static enable static build [$static]"
287 echo " --enable-mingw32 enable Win32 cross compilation with mingw32" 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 echo "" 300 echo ""
289 echo "NOTE: The object files are build at the place where configure is launched" 301 echo "NOTE: The object files are build at the place where configure is launched"
290 exit 1 302 exit 1
@@ -327,6 +339,11 @@ echo &quot;SDL support $sdl&quot; @@ -327,6 +339,11 @@ echo &quot;SDL support $sdl&quot;
327 echo "SDL static link $sdl_static" 339 echo "SDL static link $sdl_static"
328 echo "mingw32 support $mingw32" 340 echo "mingw32 support $mingw32"
329 echo "Adlib support $adlib" 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 if test $sdl_too_old = "yes"; then 348 if test $sdl_too_old = "yes"; then
332 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support" 349 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
@@ -435,6 +452,12 @@ if test &quot;$oss&quot; = &quot;yes&quot; ; then @@ -435,6 +452,12 @@ if test &quot;$oss&quot; = &quot;yes&quot; ; then
435 echo "CONFIG_OSS=yes" >> $config_mak 452 echo "CONFIG_OSS=yes" >> $config_mak
436 echo "#define CONFIG_OSS 1" >> $config_h 453 echo "#define CONFIG_OSS 1" >> $config_h
437 fi 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 echo -n "VERSION=" >>$config_mak 461 echo -n "VERSION=" >>$config_mak
439 head $source_path/VERSION >>$config_mak 462 head $source_path/VERSION >>$config_mak
440 echo "" >>$config_mak 463 echo "" >>$config_mak