From: John Floren Date: Mon, 23 May 2011 12:15:17 +0000 (+0300) Subject: kvm tools: Update makefile and feature tests X-Git-Tag: next-20110824~3^2~265 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2a14aba771c632dafc8d7b16bf778f1033c38f7d;p=karo-tx-linux.git kvm tools: Update makefile and feature tests Update feature tests to test for libvncserver. VESA support doesn't get compiled in unless libvncserver is installed. Signed-off-by: John Floren [ turning code into patches and cleanup ] Signed-off-by: Sasha Levin Signed-off-by: Pekka Enberg --- diff --git a/tools/kvm/Makefile b/tools/kvm/Makefile index e6e8d4e25eaf..2ebc86c45823 100644 --- a/tools/kvm/Makefile +++ b/tools/kvm/Makefile @@ -58,6 +58,14 @@ ifeq ($(has_bfd),y) LIBS += -lbfd endif +FLAGS_VNCSERVER=$(CFLAGS) -lvncserver +has_vncserver := $(call try-cc,$(SOURCE_VNCSERVER),$(FLAGS_VNCSERVER)) +ifeq ($(has_vncserver),y) + CFLAGS += -DCONFIG_HAS_VNCSERVER + OBJS += hw/vesa.o + LIBS += -lvncserver +endif + DEPS := $(patsubst %.o,%.d,$(OBJS)) # Exclude BIOS object files from header dependencies. @@ -153,9 +161,10 @@ bios/bios.o: bios/bios.S bios/bios-rom.bin bios/bios-rom.bin: bios/bios-rom.S bios/e820.c $(E) " CC " $@ $(Q) $(CC) -include code16gcc.h $(CFLAGS) $(BIOS_CFLAGS) -c -s bios/e820.c -o bios/e820.o + $(Q) $(CC) -include code16gcc.h $(CFLAGS) $(BIOS_CFLAGS) -c -s bios/int10.c -o bios/int10.o $(Q) $(CC) $(CFLAGS) $(BIOS_CFLAGS) -c -s bios/bios-rom.S -o bios/bios-rom.o $(E) " LD " $@ - $(Q) ld -T bios/rom.ld.S -o bios/bios-rom.bin.elf bios/bios-rom.o bios/e820.o + $(Q) ld -T bios/rom.ld.S -o bios/bios-rom.bin.elf bios/bios-rom.o bios/e820.o bios/int10.o $(E) " OBJCOPY " $@ $(Q) objcopy -O binary -j .text bios/bios-rom.bin.elf bios/bios-rom.bin $(E) " NM " $@ diff --git a/tools/kvm/config/feature-tests.mak b/tools/kvm/config/feature-tests.mak index 6170fd2531b5..0801b54d09ac 100644 --- a/tools/kvm/config/feature-tests.mak +++ b/tools/kvm/config/feature-tests.mak @@ -126,3 +126,13 @@ int main(void) return 0; } endef + +define SOURCE_VNCSERVER +#include + +int main(void) +{ + rfbIsActive((void *)0); + return 0; +} +endef