Skip to contentSkip to conversation

[4792] Change the way audio is configured

Qemu-devel malc 4 participants 5 messages Jun 25, 2008 – Jun 27, 2008 Kbuild

lore
Share & tools
lore

malc

author
#0 lore raw

Revision: 4792

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4792
Author:   malc
Date:     2008-06-25 21:04:05 +0000 (Wed, 25 Jun 2008)

Log Message:
-----------
Change the way audio is configured

Instead of having separate option for each card and driver use --audio-drv-list and --audio-card-list options.

Under Linux it allows to set the default(first probed) driver to something other than OSS.

Modified Paths:
--------------
trunk/audio/audio.c
trunk/configure
trunk/qemu-doc.texi

Modified: trunk/audio/audio.c
===================================================================

audio/audio.c +1 -21
@@ -38,27 +38,7 @@
 #define SW_NAME(sw) (sw)->name ? (sw)->name : "unknown"
 
 static struct audio_driver *drvtab[] = {
-#ifdef CONFIG_OSS
-    &oss_audio_driver,
-#endif
-#ifdef CONFIG_ALSA
-    &alsa_audio_driver,
-#endif
-#ifdef CONFIG_COREAUDIO
-    &coreaudio_audio_driver,
-#endif
-#ifdef CONFIG_DSOUND
-    &dsound_audio_driver,
-#endif
-#ifdef CONFIG_FMOD
-    &fmod_audio_driver,
-#endif
-#ifdef CONFIG_SDL
-    &sdl_audio_driver,
-#endif
-#ifdef CONFIG_ESD
-    &esd_audio_driver,
-#endif
+    AUDIO_DRIVERS
     &no_audio_driver,
     &wav_audio_driver
 };

Modified: trunk/configure
===================================================================

configure +34 -95

226 lines not on this page · raw message

Modified: trunk/qemu-doc.texi
===================================================================

qemu-doc.texi +2 -2
@@ -183,8 +183,8 @@
 SMP is supported with up to 255 CPUs.
 
 Note that adlib, ac97, gus and cs4231a are only available when QEMU
-was configured with --enable-adlib, --enable-ac97, --enable-gus or
---enable-cs4231a respectively.
+was configured with --audio-card-list option containing the name(s) of
+required cards.
 
 QEMU uses the PC BIOS from the Bochs project and the Plex86/Bochs LGPL
 VGA BIOS.
#1 lore raw

audio/audio.c:42: error: AUDIO_DRIVERS' undeclared here (not in a function) audio/audio.c:42: error: initializer element is not constant audio/audio.c:42: error: (near initialization for drvtab[0]')

Paste error?

-#endif
+ AUDIO_DRIVERS
&no_audio_driver,
&wav_audio_driver
};

#2 lore raw
Quoted 5 lines · consul

audio/audio.c:42: error: AUDIO_DRIVERS' undeclared here (not in a function) audio/audio.c:42: error: initializer element is not constant audio/audio.c:42: error: (near initialization for drvtab[0]')

Paste error?

No you have to re-run "./configure".

Quoted 10 lines
audio/audio.c +1 -1
-#endif
+    AUDIO_DRIVERS
    &no_audio_driver,
    &wav_audio_driver

};

----------------------- Laurent Vivier ---------------------- "The best way to predict the future is to invent it."
- Alan Kay

#3 lore raw

You're right. Sorry for noice.

"Laurent Vivier" <[email protected]> wrote in message news:[email protected]...

Le 27 juin 08 � 17:34, consul a �crit :

Quoted 6 lines

audio/audio.c:42: error: `AUDIO_DRIVERS' undeclared here (not in a function)
audio/audio.c:42: error: initializer element is not constant audio/audio.c:42: error: (near initialization for `drvtab[0]')

Paste error?

No you have to re-run "./configure".

Quoted 10 lines
audio/audio.c +1 -1
-#endif
+    AUDIO_DRIVERS
    &no_audio_driver,
    &wav_audio_driver

};

----------------------- Laurent Vivier ---------------------- "The best way to predict the future is to invent it."
- Alan Kay

#4 lore raw
In reply to Laurent Vivier
Quoted 10 lines · Laurent Vivier
Quoted 5 lines · consul

audio/audio.c:42: error: AUDIO_DRIVERS' undeclared here (not in a function) audio/audio.c:42: error: initializer element is not constant audio/audio.c:42: error: (near initialization for drvtab[0]')

Paste error?

No you have to re-run "./configure".

Here is a small patch which automatically calls configure when the file changes. It also tells users to run configure when they call make without a configuration.

The patch is not perfect: it tries to call configure with the last options, but it will fail at options containing white space. These are rarely used, so it is still useful.

Stefan

Makefile +10 -1
Index: Makefile
===================================================================
@@ -1,6 +1,6 @@
 # Makefile for QEMU.
 
-include config-host.mak
+-include config-host.mak
 
 .PHONY: all clean distclean dvi info install install-doc tar tarbin \
 	speed test html dvi info
@@ -180,6 +180,15 @@
 dyngen$(EXESUF): dyngen.c
 	$(HOST_CC) $(CFLAGS) $(CPPFLAGS) -o $@ $^
 
+config-host.mak: configure
+ifneq ($(wildcard config-host.mak),)
+	@echo $@ is out-of-date, running configure
+	@fgrep "Configured with:" $@ | sed s/.*Configured.with:.// | sh
+else
+	@echo "Please call configure before running make!"
+	@exit 1
+endif
+
 clean:
 # avoid old build problems by removing potentially incorrect old files
 	rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h