diff mbox

[71/81] Consolidate audio flags in configure

Message ID 499b581f23312db9ddb0f85c647af5422692ab85.1249301360.git.quintela@redhat.com
State Superseded
Headers show

Commit Message

Juan Quintela Aug. 3, 2009, 12:47 p.m. UTC
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |   17 -----------------
 configure       |   11 +++++++++++
 2 files changed, 11 insertions(+), 17 deletions(-)
diff mbox

Patch

diff --git a/Makefile.target b/Makefile.target
index 6b3d40f..22d1d53 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -202,10 +202,6 @@  obj-i386-y += cirrus_vga.o apic.o ioapic.o parallel.o acpi.o piix_pci.o
 obj-i386-y += usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o
 obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o

-ifeq ($(TARGET_BASE_ARCH), i386)
-QEMU_CFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
-endif
-
 # shared objects
 obj-ppc-y = ppc.o ide.o vga.o $(sound-obj-y) dma.o openpic.o
 # PREP target
@@ -223,11 +219,6 @@  obj-ppc-y += ppc440.o ppc440_bamboo.o
 # PowerPC E500 boards
 obj-ppc-y += ppce500_pci.o ppce500_mpc8544ds.o
 obj-ppc-$(CONFIG_KVM) += kvm_ppc.o
-
-ifeq ($(TARGET_BASE_ARCH), ppc)
-QEMU_CFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
-endif
-
 obj-ppc-$(CONFIG_FDT) += device_tree.o

 obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o
@@ -239,10 +230,6 @@  obj-mips-y += mipsnet.o
 obj-mips-y += pflash_cfi01.o
 obj-mips-y += vmware_vga.o

-ifeq ($(TARGET_BASE_ARCH), mips)
-QEMU_CFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
-endif
-
 obj-microblaze-y = petalogix_s3adsp1800_mmu.o

 obj-microblaze-y += microblaze_pic_cpu.o
@@ -299,10 +286,6 @@  obj-arm-y += syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o
 obj-arm-y += syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o
 obj-arm-y += syborg_virtio.o

-ifeq ($(TARGET_BASE_ARCH), arm)
-QEMU_CFLAGS += -DHAS_AUDIO
-endif
-
 obj-sh4-y = shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
 obj-sh4-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o
 obj-sh4-y += ide.o
diff --git a/configure b/configure
index 9bc2303..ccf0fa2 100755
--- a/configure
+++ b/configure
@@ -2134,6 +2134,17 @@  ia64)
 ;;
 esac

+if test "$target_softmmu" = "yes" ; then
+  case "$TARGET_BASE_ARCH" in
+  arm)
+    cflags="-DHAS_AUDIO $cflags"
+  ;;
+  i386|mips|ppc)
+    cflags="-DHAS_AUDIO -DHAS_AUDIO_CHOICE $cflags"
+  ;;
+  esac
+fi
+
 if test "$target_softmmu" = "yes" -a \( \
         "$TARGET_ARCH" = "microblaze" -o \
         "$TARGET_ARCH" = "cris" \) ; then