Commit 881450bb by Daniel Lezcano

use config.h to define the lxcpath and co

Instead of passing the LXCPATH definition in the compiler command line, use configure.ac to define the value in the config.h file and include this file where it is needed. Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 92d38522
......@@ -25,6 +25,11 @@ AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
AS_AC_EXPAND(LXCPATH, "${localstatedir}/lib/lxc")
AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
AH_TEMPLATE([LXCPATH], [lxc configuration repository])
AH_TEMPLATE([LXCLIBEXECDIR], [lxc executable library path])
AC_DEFINE_UNQUOTED(LXCPATH, "$LXCPATH")
AC_DEFINE_UNQUOTED(LXCLIBEXECDIR, "$LIBEXECDIR")
AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
[],
AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
......
INCLUDES= -I$(top_srcdir)/src -DLXCPATH="\"@LXCPATH@\"" \
-DLXCBINDIR="\"$(bindir)\"" \
-DLXCLIBEXECDIR="\"$(libexecdir)\""
AM_CFLAGS= -I$(top_srcdir)/src
lib_LTLIBRARIES = liblxc.la
pkginclude_HEADERS = \
start.h \
......
......@@ -37,6 +37,7 @@
#include <net/if.h>
#include "error.h"
#include "config.h"
#include <lxc/lxc.h>
#include <lxc/log.h>
......
......@@ -48,6 +48,7 @@
#include "network.h"
#include "error.h"
#include "parse.h"
#include "config.h"
#include <lxc/lxc.h>
#include <lxc/log.h>
......
......@@ -32,11 +32,12 @@
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "error.h"
#include <lxc/lxc.h>
#include <lxc/log.h>
#include "config.h"
lxc_log_define(lxc_create, lxc);
static int dir_filter(const struct dirent *dirent)
......
......@@ -33,6 +33,8 @@
#include <lxc/lxc.h>
#include <lxc/log.h>
#include "config.h"
lxc_log_define(lxc_destroy, lxc);
static int remove_lxc_directory(const char *dirname)
......
......@@ -31,6 +31,8 @@
#include <sys/param.h>
#include "error.h"
#include "config.h"
#include <lxc/lxc.h>
lxc_log_define(lxc_lock, lxc);
......
......@@ -29,6 +29,7 @@
#include <lxc.h>
#include "arguments.h"
#include "config.h"
lxc_log_define(lxc_checkpoint, lxc);
......
......@@ -34,6 +34,7 @@
#include <lxc/lxc.h>
#include "confile.h"
#include "arguments.h"
#include "config.h"
lxc_log_define(lxc_execute, lxc);
......
......@@ -24,7 +24,6 @@
#define __namespace_h
#include <syscall.h>
#define _GNU_SOURCE
#include <sched.h>
#ifndef CLONE_FS
......
......@@ -34,6 +34,7 @@
#include <lxc/lxc.h>
#include <lxc/log.h>
#include "commands.h"
#include "config.h"
lxc_log_define(lxc_state, lxc);
......
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