]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Update makefile and feature tests
authorJohn Floren <john@jfloren.net>
Mon, 23 May 2011 12:15:17 +0000 (15:15 +0300)
committerPekka Enberg <penberg@kernel.org>
Mon, 23 May 2011 14:07:39 +0000 (17:07 +0300)
Update feature tests to test for libvncserver.

VESA support doesn't get compiled in unless libvncserver
is installed.

Signed-off-by: John Floren <john@jfloren.net>
[ turning code into patches and cleanup ]
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/Makefile
tools/kvm/config/feature-tests.mak

index e6e8d4e25eaff60348c3534af1eb33255548ac27..2ebc86c458232588ebf5a6759b766b45f78b9d76 100644 (file)
@@ -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      " $@
index 6170fd2531b5e681ca1986fa0b231d3b3029382b..0801b54d09acf7b3ea11e841aed183b83cdd3644 100644 (file)
@@ -126,3 +126,13 @@ int main(void)
        return 0;
 }
 endef
+
+define SOURCE_VNCSERVER
+#include <rfb/rfb.h>
+
+int main(void)
+{
+       rfbIsActive((void *)0);
+       return 0;
+}
+endef