mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-06-06 08:57:22 +00:00
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: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
parent
92d385229b
commit
881450bbed
@ -25,6 +25,11 @@ AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
|
|||||||
AS_AC_EXPAND(LXCPATH, "${localstatedir}/lib/lxc")
|
AS_AC_EXPAND(LXCPATH, "${localstatedir}/lib/lxc")
|
||||||
AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
|
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_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
|
||||||
[],
|
[],
|
||||||
AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
|
AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
INCLUDES= -I$(top_srcdir)/src -DLXCPATH="\"@LXCPATH@\"" \
|
AM_CFLAGS= -I$(top_srcdir)/src
|
||||||
-DLXCBINDIR="\"$(bindir)\"" \
|
|
||||||
-DLXCLIBEXECDIR="\"$(libexecdir)\""
|
|
||||||
lib_LTLIBRARIES = liblxc.la
|
lib_LTLIBRARIES = liblxc.la
|
||||||
pkginclude_HEADERS = \
|
pkginclude_HEADERS = \
|
||||||
start.h \
|
start.h \
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
|
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <lxc/lxc.h>
|
#include <lxc/lxc.h>
|
||||||
#include <lxc/log.h>
|
#include <lxc/log.h>
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
#include "network.h"
|
#include "network.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <lxc/lxc.h>
|
#include <lxc/lxc.h>
|
||||||
#include <lxc/log.h>
|
#include <lxc/log.h>
|
||||||
|
@ -32,11 +32,12 @@
|
|||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include <lxc/lxc.h>
|
#include <lxc/lxc.h>
|
||||||
#include <lxc/log.h>
|
#include <lxc/log.h>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
lxc_log_define(lxc_create, lxc);
|
lxc_log_define(lxc_create, lxc);
|
||||||
|
|
||||||
static int dir_filter(const struct dirent *dirent)
|
static int dir_filter(const struct dirent *dirent)
|
||||||
|
@ -33,6 +33,8 @@
|
|||||||
#include <lxc/lxc.h>
|
#include <lxc/lxc.h>
|
||||||
#include <lxc/log.h>
|
#include <lxc/log.h>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
lxc_log_define(lxc_destroy, lxc);
|
lxc_log_define(lxc_destroy, lxc);
|
||||||
|
|
||||||
static int remove_lxc_directory(const char *dirname)
|
static int remove_lxc_directory(const char *dirname)
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <lxc/lxc.h>
|
#include <lxc/lxc.h>
|
||||||
|
|
||||||
lxc_log_define(lxc_lock, lxc);
|
lxc_log_define(lxc_lock, lxc);
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include <lxc.h>
|
#include <lxc.h>
|
||||||
#include "arguments.h"
|
#include "arguments.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
lxc_log_define(lxc_checkpoint, lxc);
|
lxc_log_define(lxc_checkpoint, lxc);
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include <lxc/lxc.h>
|
#include <lxc/lxc.h>
|
||||||
#include "confile.h"
|
#include "confile.h"
|
||||||
#include "arguments.h"
|
#include "arguments.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
lxc_log_define(lxc_execute, lxc);
|
lxc_log_define(lxc_execute, lxc);
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#define __namespace_h
|
#define __namespace_h
|
||||||
|
|
||||||
#include <syscall.h>
|
#include <syscall.h>
|
||||||
#define _GNU_SOURCE
|
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
|
|
||||||
#ifndef CLONE_FS
|
#ifndef CLONE_FS
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include <lxc/lxc.h>
|
#include <lxc/lxc.h>
|
||||||
#include <lxc/log.h>
|
#include <lxc/log.h>
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
lxc_log_define(lxc_state, lxc);
|
lxc_log_define(lxc_state, lxc);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user