debuggers.hg

changeset 22257:07c1d958eee0

tools/python: do not link against blktap except on Linux

Link to libblktapctl in python setup only for platforms which build it.
This fixes a build breakage on NetBSD introduced in 330c4d9010da.

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Tested-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Gianni Tedesco <gianni.tedesco@citrix.com>
date Thu Sep 23 19:03:52 2010 +0100 (2010-09-23)
parents 4d95192b2fc8
children 105c938eacbb
files tools/python/setup.py
line diff
     1.1 --- a/tools/python/setup.py	Thu Sep 23 19:01:37 2010 +0100
     1.2 +++ b/tools/python/setup.py	Thu Sep 23 19:03:52 2010 +0100
     1.3 @@ -14,8 +14,7 @@ include_dirs = [ XEN_ROOT + "/tools/libx
     1.4  
     1.5  library_dirs = [ XEN_ROOT + "/tools/libxc",
     1.6                   XEN_ROOT + "/tools/xenstore",
     1.7 -                 XEN_ROOT + "/tools/libxl",
     1.8 -                 XEN_ROOT + "/tools/blktap2/control",
     1.9 +                 XEN_ROOT + "/tools/libxl"
    1.10                   ]
    1.11  
    1.12  libraries = [ "xenctrl", "xenguest", "xenstore" ]
    1.13 @@ -23,8 +22,11 @@ libraries = [ "xenctrl", "xenguest", "xe
    1.14  plat = os.uname()[0]
    1.15  if plat == 'Linux':
    1.16      uuid_libs = ["uuid"]
    1.17 +    blktap_ctl_libs = ["blktapctl"]
    1.18 +    library_dirs.append(XEN_ROOT + "/tools/blktap2/control")
    1.19  else:
    1.20      uuid_libs = []
    1.21 +    blktap_ctl_libs = []
    1.22  
    1.23  xc = Extension("xc",
    1.24                 extra_compile_args = extra_compile_args,
    1.25 @@ -96,7 +98,7 @@ xl = Extension("xl",
    1.26                 extra_compile_args = extra_compile_args,
    1.27                 include_dirs       = include_dirs + [ "xen/lowlevel/xl" ],
    1.28                 library_dirs       = library_dirs,
    1.29 -               libraries          = libraries + ["xenlight", "blktapctl" ] + uuid_libs,
    1.30 +               libraries          = libraries + ["xenlight" ] + blktap_ctl_libs + uuid_libs,
    1.31                 sources            = [ "xen/lowlevel/xl/xl.c", "xen/lowlevel/xl/_pyxl_types.c" ])
    1.32  
    1.33  modules = [ xc, xs, ptsname, acm, flask, xl ]