From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: [PATCH 4/5 V2] kvm tools: Update makefile and feature tests Date: Mon, 23 May 2011 14:19:12 +0300 Message-ID: <1306149553-26793-4-git-send-email-levinsasha928@gmail.com> References: <1306149553-26793-1-git-send-email-levinsasha928@gmail.com> Cc: john@jfloren.net, kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com, gorcunov@gmail.com, prasadjoshi124@gmail.com, Sasha Levin To: penberg@kernel.org Return-path: Received: from mail-ww0-f44.google.com ([74.125.82.44]:36635 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752925Ab1EWLTh (ORCPT ); Mon, 23 May 2011 07:19:37 -0400 Received: by wwa36 with SMTP id 36so6080884wwa.1 for ; Mon, 23 May 2011 04:19:36 -0700 (PDT) In-Reply-To: <1306149553-26793-1-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 --- tools/kvm/Makefile | 11 ++++++++++- tools/kvm/config/feature-tests.mak | 10 ++++++++++ 2 files changed, 20 insertions(+), 1 deletions(-) diff --git a/tools/kvm/Makefile b/tools/kvm/Makefile index e6e8d4e..2ebc86c 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 6170fd2..0801b54 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 -- 1.7.5.rc3