ia64/xen-unstable

changeset 15938:fdabc0af5852

[VTD] dynamically determines whether to link with libpci or not in QEMU.

This patch to ioemu/Makefile.target dynamically decides whether to
link with libpci or not base on the existence of /usr/include/pci
directory.

If /usr/include/pci exists, PCI passthrough is enabled. Otherwise, it
is disabled.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
author Keir Fraser <keir@xensource.com>
date Thu Sep 20 09:40:49 2007 +0100 (2007-09-20)
parents 177ebf350b4c
children 39c85fa942aa
files tools/ioemu/Makefile.target
line diff
     1.1 --- a/tools/ioemu/Makefile.target	Wed Sep 19 15:42:56 2007 +0100
     1.2 +++ b/tools/ioemu/Makefile.target	Thu Sep 20 09:40:49 2007 +0100
     1.3 @@ -197,9 +197,6 @@ CPPFLAGS+=-D_GNU_SOURCE
     1.4  LIBS+=-lm
     1.5  LIBS+=-L../../libxc -lxenctrl -lxenguest
     1.6  LIBS+=-L../../xenstore -lxenstore
     1.7 -ifdef CONFIG_PASSTHROUGH
     1.8 -LIBS+=-lpci
     1.9 -endif
    1.10  ifndef CONFIG_USER_ONLY
    1.11  LIBS+=-lz
    1.12  endif
    1.13 @@ -351,6 +348,16 @@ ifdef CONFIG_WIN32
    1.14  VL_OBJS+=tap-win32.o
    1.15  endif
    1.16  
    1.17 +ifeq (,$(wildcard /usr/include/pci))
    1.18 +$(warning *** pciutils-devl package not found - missing /usr/include/pci)
    1.19 +$(warning *** PCI passthrough capability has been disabled)
    1.20 +else
    1.21 +LIBS+=-lpci
    1.22 +VL_OBJS+= pass-through.o
    1.23 +CFLAGS += -DCONFIG_PASSTHROUGH
    1.24 +$(info *** PCI passthrough capability has been enabled ***)
    1.25 +endif
    1.26 +
    1.27  SOUND_HW = sb16.o es1370.o
    1.28  AUDIODRV = audio.o noaudio.o wavaudio.o
    1.29  ifdef CONFIG_SDL
    1.30 @@ -403,9 +410,6 @@ VL_OBJS+= piix4acpi.o
    1.31  VL_OBJS+= xenstore.o
    1.32  VL_OBJS+= xen_platform.o
    1.33  VL_OBJS+= tpm_tis.o
    1.34 -ifdef CONFIG_PASSTHROUGH
    1.35 -VL_OBJS+= pass-through.o
    1.36 -endif
    1.37  CPPFLAGS += -DHAS_AUDIO
    1.38  endif
    1.39  ifeq ($(TARGET_BASE_ARCH), ppc)