Commit 6373bd68 by dlezcano

Use pkgconfig to retrieve localstatedir

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: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent abd4a3b3
......@@ -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
......
......@@ -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
......
#!/bin/bash
lxcpath=@localstatedir@/lxc
lxcpath=$(PKG_CONFIG_PATH=/usr/lib/pkgconfig pkg-config --variable=localstatedir lxc)/lxc
if [ ! -r $lxcpath ]; then
exit 0
......
#!/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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment