|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: provide xenlight.pc
commit babeca328413baebfdca366a5b17c06acf4295e8
Author: Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Fri Jan 9 14:32:18 2015 +0000
Commit: Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Mon Jan 19 15:32:17 2015 +0000
libxl: provide xenlight.pc
A pkg-config file for libxl. It also contains two variables
(xenfirmwaredir and libexec_bin) so that tools that are very keen on
knowing the locations of Xen binaries (say, libvirt) can use them to
determine the location of the binaries.
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
[ ijc -- ran autogen.sh ]
---
.gitignore | 2 ++
config/Paths.mk.in | 2 +-
configure | 4 ++++
m4/paths.m4 | 3 +++
tools/configure | 7 ++++++-
tools/configure.ac | 1 +
tools/libxl/Makefile | 11 ++++++++++-
tools/libxl/xenlight.pc.in.in | 11 +++++++++++
8 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/.gitignore b/.gitignore
index a8f15d5..33c2ca0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -153,6 +153,8 @@ tools/include/xen/*
tools/include/xen-foreign/*.(c|h|size)
tools/include/xen-foreign/checker
tools/libxl/libxlu_cfg_y.output
+tools/libxl/xenlight.pc
+tools/libxl/xenlight.pc.in
tools/libxl/xl
tools/libxl/testenum
tools/libxl/testenum.c
diff --git a/config/Paths.mk.in b/config/Paths.mk.in
index fe10f76..150bae7 100644
--- a/config/Paths.mk.in
+++ b/config/Paths.mk.in
@@ -57,7 +57,7 @@ BASH_COMPLETION_DIR := $(CONFIG_DIR)/bash_completion.d
XEN_LOCK_DIR := @XEN_LOCK_DIR@
XEN_PAGING_DIR := @XEN_PAGING_DIR@
-XENFIRMWAREDIR := $(LIBEXEC)/boot
+XENFIRMWAREDIR := @XENFIRMWAREDIR@
XEN_CONFIG_DIR := @XEN_CONFIG_DIR@
XEN_SCRIPT_DIR := @XEN_SCRIPT_DIR@
diff --git a/configure b/configure
index 718e92f..8a084c8 100755
--- a/configure
+++ b/configure
@@ -604,6 +604,7 @@ SHAREDIR
XEN_LIB_STORED
XEN_LOG_DIR
XEN_RUN_DIR
+XENFIRMWAREDIR
LIBEXEC_BIN
CONFIG_LEAF_DIR
host_os
@@ -1930,6 +1931,9 @@ libexecdir=`eval echo $libexecdir`
LIBEXEC_BIN=`eval echo $libexecdir/$PACKAGE_TARNAME/bin`
+XENFIRMWAREDIR=`eval echo $libexecdir/$PACKAGE_TARNAME/boot`
+
+
XEN_RUN_DIR=$localstatedir/run/xen
diff --git a/m4/paths.m4 b/m4/paths.m4
index 7ede5bd..db74f55 100644
--- a/m4/paths.m4
+++ b/m4/paths.m4
@@ -77,6 +77,9 @@ dnl This variable will be substituted in various .in files
LIBEXEC_BIN=`eval echo $libexecdir/$PACKAGE_TARNAME/bin`
AC_SUBST(LIBEXEC_BIN)
+XENFIRMWAREDIR=`eval echo $libexecdir/$PACKAGE_TARNAME/boot`
+AC_SUBST(XENFIRMWAREDIR)
+
XEN_RUN_DIR=$localstatedir/run/xen
AC_SUBST(XEN_RUN_DIR)
diff --git a/tools/configure b/tools/configure
index 4117c83..1cab804 100755
--- a/tools/configure
+++ b/tools/configure
@@ -718,6 +718,7 @@ SHAREDIR
XEN_LIB_STORED
XEN_LOG_DIR
XEN_RUN_DIR
+XENFIRMWAREDIR
LIBEXEC_BIN
CONFIG_LEAF_DIR
FILE_OFFSET_BITS
@@ -2273,7 +2274,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_config_files="$ac_config_files ../config/Tools.mk
hotplug/FreeBSD/rc.d/xencommons hotplug/Linux/init.d/sysconfig.xencommons
hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons
hotplug/Linux/init.d/xendomains hotplug/Linux/systemd/proc-xen.mount
hotplug/Linux/systemd/var-lib-xenstored.mount
hotplug/Linux/systemd/xen-init-dom0.service
hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service
hotplug/Linux/systemd/xen-watchdog.service
hotplug/Linux/systemd/xenconsoled.service
hotplug/Linux/systemd/xendomains.service
hotplug/Linux/systemd/xenstored.service hotplug/Linux/systemd/xenstored.socket
hotplug/Linux/systemd/xenstored_ro.socket hotplug/Linux/vif-setup
hotplug/Linux/xen-backend.rules hotplug/Linux/xen-hotplug-common.sh
hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons"
+ac_config_files="$ac_config_files ../config/Tools.mk
hotplug/FreeBSD/rc.d/xencommons hotplug/Linux/init.d/sysconfig.xencommons
hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons
hotplug/Linux/init.d/xendomains hotplug/Linux/systemd/proc-xen.mount
hotplug/Linux/systemd/var-lib-xenstored.mount
hotplug/Linux/systemd/xen-init-dom0.service
hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service
hotplug/Linux/systemd/xen-watchdog.service
hotplug/Linux/systemd/xenconsoled.service
hotplug/Linux/systemd/xendomains.service
hotplug/Linux/systemd/xenstored.service hotplug/Linux/systemd/xenstored.socket
hotplug/Linux/systemd/xenstored_ro.socket hotplug/Linux/vif-setup
hotplug/Linux/xen-backend.rules hotplug/Linux/xen-hotplug-common.sh
hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons libxl/xenlight.pc.in"
ac_config_headers="$ac_config_headers config.h"
@@ -3767,6 +3768,9 @@ libexecdir=`eval echo $libexecdir`
LIBEXEC_BIN=`eval echo $libexecdir/$PACKAGE_TARNAME/bin`
+XENFIRMWAREDIR=`eval echo $libexecdir/$PACKAGE_TARNAME/boot`
+
+
XEN_RUN_DIR=$localstatedir/run/xen
@@ -9559,6 +9563,7 @@ do
"hotplug/Linux/xen-hotplug-common.sh") CONFIG_FILES="$CONFIG_FILES
hotplug/Linux/xen-hotplug-common.sh" ;;
"hotplug/Linux/xendomains") CONFIG_FILES="$CONFIG_FILES
hotplug/Linux/xendomains" ;;
"hotplug/NetBSD/rc.d/xencommons") CONFIG_FILES="$CONFIG_FILES
hotplug/NetBSD/rc.d/xencommons" ;;
+ "libxl/xenlight.pc.in") CONFIG_FILES="$CONFIG_FILES libxl/xenlight.pc.in"
;;
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
diff --git a/tools/configure.ac b/tools/configure.ac
index 72e2465..24fdfc3 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -27,6 +27,7 @@ hotplug/Linux/xen-backend.rules
hotplug/Linux/xen-hotplug-common.sh
hotplug/Linux/xendomains
hotplug/NetBSD/rc.d/xencommons
+libxl/xenlight.pc.in
])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([../])
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 6a8575b..08fe814 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -143,13 +143,15 @@ $(XEN_INIT_DOM0_OBJS): CFLAGS += $(CFLAGS_libxenstore)
SAVE_HELPER_OBJS = libxl_save_helper.o _libxl_save_msgs_helper.o
$(SAVE_HELPER_OBJS): CFLAGS += $(CFLAGS_libxenctrl)
+PKG_CONFIG = xenlight.pc
+
testidl.o: CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenlight)
testidl.c: libxl_types.idl gentest.py libxl.h $(AUTOINCS)
$(PYTHON) gentest.py libxl_types.idl testidl.c.new
mv testidl.c.new testidl.c
.PHONY: all
-all: $(CLIENTS) $(TEST_PROGS) \
+all: $(CLIENTS) $(TEST_PROGS) $(PKG_CONFIG) \
libxenlight.so libxenlight.a libxlutil.so libxlutil.a \
$(AUTOSRCS) $(AUTOINCS)
@@ -248,6 +250,10 @@ libxl-save-helper: $(SAVE_HELPER_OBJS) libxenlight.so
testidl: testidl.o libxlutil.so libxenlight.so
$(CC) $(LDFLAGS) -o $@ testidl.o libxlutil.so $(LDLIBS_libxenlight)
$(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
+xenlight.pc: xenlight.pc.in Makefile
+ @sed -e 's/@@version@@/$(MAJOR).$(MINOR)/g' < xenlight.pc.in > $@.new
+ @mv -f $@.new $@
+
.PHONY: install
install: all
$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
@@ -255,6 +261,7 @@ install: all
$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
$(INSTALL_DIR) $(DESTDIR)$(BASH_COMPLETION_DIR)
$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
+ $(INSTALL_DIR) $(DESTDIR)$(SHAREDIR)/pkgconfig
$(INSTALL_PROG) xl $(DESTDIR)$(SBINDIR)
$(INSTALL_PROG) xen-init-dom0 $(DESTDIR)$(LIBEXEC_BIN)
$(INSTALL_PROG) libxl-save-helper $(DESTDIR)$(LIBEXEC_BIN)
@@ -268,12 +275,14 @@ install: all
$(INSTALL_DATA) libxlutil.a $(DESTDIR)$(LIBDIR)
$(INSTALL_DATA) libxl.h libxl_event.h libxl_json.h _libxl_types.h
_libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h libxlutil.h
$(DESTDIR)$(INCLUDEDIR)
$(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh
+ $(INSTALL_DATA) xenlight.pc $(DESTDIR)$(SHAREDIR)/pkgconfig/
.PHONY: clean
clean:
$(RM) -f _*.h *.o *.so* *.a $(CLIENTS) $(DEPS)
$(RM) -f _*.c *.pyc _paths.*.tmp _*.api-for-check
$(RM) -f testidl.c.new testidl.c *.api-ok
+ $(RM) -f xenlight.pc xenlight.pc.in
distclean: clean
diff --git a/tools/libxl/xenlight.pc.in.in b/tools/libxl/xenlight.pc.in.in
new file mode 100644
index 0000000..c27872e
--- /dev/null
+++ b/tools/libxl/xenlight.pc.in.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+includedir=@includedir@
+libdir=@libdir@
+xenfirmwaredir=@XENFIRMWAREDIR@
+libexec_bin=@LIBEXEC_BIN@
+
+Name: Xenlight
+Description: The Xenlight library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lxenlight
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |