From dfe5ae0887b74fa7507a13dfa3f620334a67f89d Mon Sep 17 00:00:00 2001 From: Juan Quintela <quintela@redhat.com> Date: Wed, 22 Jul 2009 11:13:44 +0200 Subject: [PATCH 14/16] Be able to compile out bluetooth https://bugzilla.redhat.com/512837 Signed-off-by: Juan Quintela <quintela@redhat.com> Message-Id: <8b244aa153005ebfa6140badc0e6cf9c54218ef7.1248252586.git.quintela@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Bugzilla: 512837 Obsoletes: <5e5d282e32901eeaa0da25d6a66c9d3625642b17.1248207933.git.quintela@redhat.com> Acked-by: Dor Laor <dlaor@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> RH-Upstream-status: pending Acked-by: Eduardo Habkost <ehabkost@redhat.com> --- qemu/Makefile | 2 ++ qemu/configure | 1 + qemu/vl.c | 10 ++++++++++ 3 files changed, 13 insertions(+), 0 deletions(-) diff --git a/qemu/Makefile b/qemu/Makefile index 6f20366..0367639 100644 --- a/qemu/Makefile +++ b/qemu/Makefile @@ -97,10 +97,12 @@ ifdef CONFIG_USB_NET OBJS+=usb-net.o endif OBJS+=sd.o ssi-sd.o +ifdef CONFIG_BLUEZ OBJS+=bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o ifdef CONFIG_USB_BLUEZ OBJS+=usb-net.o endif +endif OBJS+=buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o OBJS+=qemu-char.o aio.o net-checksum.o savevm.o cache-utils.o diff --git a/qemu/configure b/qemu/configure index 1a66745..1a9d065 100755 --- a/qemu/configure +++ b/qemu/configure @@ -1338,6 +1338,7 @@ echo "USB serial $usb_serial" echo "USB net $usb_net" echo "USB bluez $usb_bluez" echo "VMware drivers $vmware" +echo "bluetooth support $bluez" echo "Only generic cpus $x86_only_generic_cpus" if test $sdl_too_old = "yes"; then diff --git a/qemu/vl.c b/qemu/vl.c index 00e58ff..3062006 100644 --- a/qemu/vl.c +++ b/qemu/vl.c @@ -2017,6 +2017,7 @@ int check_params(char *buf, int buf_size, return 0; } +#ifdef CONFIG_BLUEZ /***********************************************************/ /* Bluetooth support */ static int nb_hcis; @@ -2207,6 +2208,7 @@ static int bt_parse(const char *opt) fprintf(stderr, "qemu: bad bluetooth parameter '%s'\n", opt); return 1; } +#endif /* CONFIG_BLUEZ */ /***********************************************************/ /* QEMU Block devices */ @@ -5084,8 +5086,10 @@ int main(int argc, char **argv, char **envp) int cyls, heads, secs, translation; const char *net_clients[MAX_NET_CLIENTS]; int nb_net_clients; +#ifdef CONFIG_BLUEZ const char *bt_opts[MAX_BT_CMDLINE]; int nb_bt_opts; +#endif int hda_index; int optind; const char *r, *optarg; @@ -5179,7 +5183,9 @@ int main(int argc, char **argv, char **envp) assigned_devices_index = 0; nb_net_clients = 0; +#ifdef CONFIG_BLUEZ nb_bt_opts = 0; +#endif nb_drives = 0; nb_drives_opt = 0; hda_index = -1; @@ -5415,6 +5421,7 @@ int main(int argc, char **argv, char **envp) net_slirp_redir(optarg); break; #endif +#ifdef CONFIG_BLUEZ case QEMU_OPTION_bt: if (nb_bt_opts >= MAX_BT_CMDLINE) { fprintf(stderr, "qemu: too many bluetooth options\n"); @@ -5422,6 +5429,7 @@ int main(int argc, char **argv, char **envp) } bt_opts[nb_bt_opts++] = optarg; break; +#endif #ifdef HAS_AUDIO case QEMU_OPTION_audio_help: AUD_help (); @@ -6093,10 +6101,12 @@ int main(int argc, char **argv, char **envp) } #endif +#ifdef CONFIG_BLUEZ /* init the bluetooth world */ for (i = 0; i < nb_bt_opts; i++) if (bt_parse(bt_opts[i])) exit(1); +#endif /* init the memory */ phys_ram_size = machine->ram_require & ~RAMSIZE_FIXED; -- 1.6.3.rc4.29.g8146