]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Use pkgconfig to retrieve localstatedir
authordlezcano <dlezcano>
Thu, 20 Nov 2008 19:57:47 +0000 (19:57 +0000)
committerdlezcano <dlezcano>
Thu, 20 Nov 2008 19:57:47 +0000 (19:57 +0000)
From: Matt Helsley <matthltc@us.ibm.com>

Use the pkgconfig to locate in the lxc scripts the place where .../var/lxc
is.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Makefile.am
configure.in
src/lxc/lxc-ls.in
src/lxc/lxc-ps.in

index e35838a4466ee7dab542c6f50924b9f98cb5c4b7..0ecfb1df0cbd9ed5e0f3397ce58b16fc74888162 100644 (file)
@@ -2,7 +2,9 @@
 
 SUBDIRS = doc src test etc
 DIST_SUBDIRS = config doc src test etc
-EXTRA_DIST = lxc.spec CONTRIBUTING MAINTAINERS ChangeLog
+EXTRA_DIST = lxc.spec CONTRIBUTING MAINTAINERS ChangeLog lxc.pc.in
+pkgconfigdir = /usr/lib/pkgconfig
+pkgconfig_DATA = lxc.pc
 
 ChangeLog::
        @touch ChangeLog
index c1525debac9e2e6dd886f807de312c845a94a305..3b6ccfb7d856be8a5ae066e38056f7f52320a67a 100644 (file)
@@ -15,6 +15,7 @@ AC_PROG_LIBTOOL
 AC_CHECK_PROG(SETCAP, setcap, yes, no)
 AC_CHECK_PROG(DOCBOOK, docbook2man, yes, no)
 AM_CONDITIONAL(ENABLE_DOCBOOK, test x$DOCBOOK = xyes)
+PKG_PROG_PKG_CONFIG
 
 AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found]),
 [#include <linux/types.h>
@@ -37,12 +38,15 @@ fi
 AC_ARG_ENABLE(test, [  --enable-test    compile test program [default=no]],, enable_test=no)
 AM_CONDITIONAL(ENABLE_TEST, test x$enable_test = xyes)
 
+
+
 AC_SUBST(LXC_MAJOR_VERSION)
 AC_SUBST(LXC_MINOR_VERSION)
 AC_SUBST(LXC_MICRO_VERSION)
 
 AC_CONFIG_FILES([
         Makefile
+       lxc.pc
        lxc.spec
         config/Makefile
 
index aa84887db11779b1645bb344b21a727f454b338d..b87a00c3ec1da0c4b834aa4b9f2b2c1caf8501ab 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-lxcpath=@localstatedir@/lxc
+lxcpath=$(PKG_CONFIG_PATH=/usr/lib/pkgconfig pkg-config --variable=localstatedir lxc)/lxc
 
 if [ ! -r $lxcpath ]; then
     exit 0
index 9c5bf83f7a1457db5f0003fad47fd3efa5714b36..4bbbfe406a1b187d0dff8021357aa150e304aca4 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 # set -ex
-lxcpath=@localstatedir@/lxc
+lxcpath=$(PKG_CONFIG_PATH=/usr/lib/pkgconfig pkg-config --variable=localstatedir lxc)/lxc
 
 if [ ! -r $lxcpath ]; then
     exit 0