A xenstore.pc and xentoollog.pc exists only since Xen 4.9.
Fixes commit fe7c07adac30994dd042515e1076e195128e15cd
Signed-off-by: Olaf Hering <olaf(a)aepfle.de>
---
meson.build | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index 04c229d7f4..f3ff57d336 100644
--- a/meson.build
+++ b/meson.build
@@ -1500,14 +1500,22 @@ if not get_option('driver_libxl').disabled() and
conf.has('WITH_LIBVIRTD')
endif
xl_util_dep = dependency('xlutil')
- xen_store_dep = dependency('xenstore')
+ # xenstore.pc exists since Xen 4.9
+ if libxl_dep.version().version_compare('>=4.9.0')
+ xen_store_dep = dependency('xenstore')
+ else
+ xen_store_dep = cc.find_library('xenstore')
+ endif
# xtl_* infrastructure is in libxentoollog since Xen 4.7 previously
# it was in libxenctrl.
- if libxl_dep.version().version_compare('>=4.7.0')
+ # xentoollog.pc exists since Xen 4.9
+ if libxl_dep.version().version_compare('>=4.9.0')
xtl_link_dep = dependency('xentoollog')
+ elif libxl_dep.version().version_compare('>=4.7.0')
+ xtl_link_dep = cc.find_library('xentoollog')
else
- xtl_link_dep = dependency('xenctrl')
+ xtl_link_dep = cc.find_library('xenctrl')
endif
if libxl_dep.version().version_compare('>=4.13.0')