a, libxl_event.h is included in libxl.h. So, the former one also need to be installed.
b, define __XEN_TOOLS__ in libxl.h:
the head file "xen/sysctl.h" need check this macro.
It is the same way used by the xen libxc public headers(tools/libxc/xenctrl.h and tools/libxc/xenctrlosdep.h).
Signed-off-by: Bamvor Jian Zhang <bjzhang@xxxxxxxx>
diff -r 87218bd367be tools/libxl/Makefile
--- a/tools/libxl/MakefileFri Feb 17 12:24:38 2012 +0000
+++ b/tools/libxl/MakefileMon Feb 20 15:36:09 2012 +0800
@@ -163,7 +163,7 @@
ln -sf libxlutil.so.$(XLUMAJOR).$(XLUMINOR) $(DESTDIR)$(LIBDIR)/libxlutil.so.$(XLUMAJOR)
ln -sf libxlutil.so.$(XLUMAJOR) $(DESTDIR)$(LIBDIR)/libxlutil.so
$(INSTALL_DATA) libxlutil.a $(DESTDIR)$(LIBDIR)
-$(INSTALL_DATA) libxl.h libxl_json.h _libxl_types.h _libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h $(DESTDIR)$(INCLUDEDIR)
+$(INSTALL_DATA) libxl.h libxl_json.h _libxl_types.h _libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h libxl_event.h $(DESTDIR)$(INCLUDEDIR)
$(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh
.PHONY: clean
diff -r 87218bd367be tools/libxl/libxl.h
--- a/tools/libxl/libxl.hFri Feb 17 12:24:38 2012 +0000
+++ b/tools/libxl/libxl.hMon Feb 20 15:36:09 2012 +0800
@@ -127,6 +127,11 @@
#ifndef LIBXL_H
#define LIBXL_H
+/* Tell the Xen public headers we are a user-space tools build. */
+#ifndef __XEN_TOOLS__
+#define __XEN_TOOLS__ 1
+#endif
+
#include <stdbool.h>
#include <stdint.h>
#include <stdarg.h>
|