Linux Container Development
 help / color / mirror / Atom feed
* liblxc: Add pkg-config file
@ 2009-01-29 10:27 Matt Helsley
  0 siblings, 0 replies; only message in thread
From: Matt Helsley @ 2009-01-29 10:27 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: Containers

Add a pkg-config file which makes developing with liblxc easier. For
example, if an unusual --prefix is used to install liblxc no special
changes to Makefile rules are needed if pkg-config is used:

        gcc $(shell pkg-config --cflags) $(shell pkg-config --libs) -o my_lxc_prog my_lxc_prog.c

Signed-off-by: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
 Makefile.am  |    5 ++++-
 configure.in |    2 ++
 lxc.pc.in    |   15 +++++++++++++++
 3 files changed, 21 insertions(+), 1 deletion(-)

Index: lxc-0.5.2-mh/configure.in
===================================================================
--- lxc-0.5.2-mh.orig/configure.in
+++ lxc-0.5.2-mh/configure.in
@@ -14,6 +14,7 @@ AC_GNU_SOURCE
 AC_PROG_LIBTOOL
 AC_CHECK_PROG(SETCAP, setcap, yes, no)
 AC_CHECK_PROG(DOCBOOK, docbook2man, yes, no)
+PKG_PROG_PKG_CONFIG
 AM_CONDITIONAL(ENABLE_DOCBOOK, test x$DOCBOOK = xyes)
 AS_AC_EXPAND(BINDIR, $bindir)
 AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
@@ -52,6 +53,7 @@ AC_SUBST(LXC_MICRO_VERSION)
 AC_CONFIG_FILES([
         Makefile
 	lxc.spec
+ 	lxc.pc
         config/Makefile
 
         doc/Makefile
Index: lxc-0.5.2-mh/lxc.pc.in
===================================================================
--- /dev/null
+++ lxc-0.5.2-mh/lxc.pc.in
@@ -0,0 +1,15 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+libexecdir=@libexecdir@
+includedir=@includedir@
+datadir=@datadir@
+
+localstatedir=@localstatedir@
+
+Name: lxc
+Description: Linux containers tools
+Version: @VERSION@
+Requires:
+Libs:
+Cflags:
Index: lxc-0.5.2-mh/Makefile.am
===================================================================
--- lxc-0.5.2-mh.orig/Makefile.am
+++ lxc-0.5.2-mh/Makefile.am
@@ -2,7 +2,10 @@
 
 SUBDIRS = doc src test etc scripts 
 DIST_SUBDIRS = config doc src test etc scripts
-EXTRA_DIST = lxc.spec CONTRIBUTING MAINTAINERS ChangeLog
+EXTRA_DIST = lxc.spec lxc.pc.in CONTRIBUTING MAINTAINERS ChangeLog
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = lxc.pc
 
 ChangeLog::
 	@touch ChangeLog

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-29 10:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-29 10:27 liblxc: Add pkg-config file Matt Helsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox