]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
use config.h to define the lxcpath and co
authorDaniel Lezcano <dlezcano@fr.ibm.com>
Thu, 22 Oct 2009 13:33:40 +0000 (15:33 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Thu, 22 Oct 2009 13:33:40 +0000 (15:33 +0200)
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>
configure.ac
src/lxc/Makefile.am
src/lxc/cgroup.c
src/lxc/conf.c
src/lxc/create.c
src/lxc/destroy.c
src/lxc/lock.c
src/lxc/lxc_checkpoint.c
src/lxc/lxc_execute.c
src/lxc/namespace.h
src/lxc/state.c

index 3e68ed638a36147f2de5d0709ab1b9cf0fe4899b..3acd0fd050873ed7348bab11d05ad521d85d4085 100644 (file)
@@ -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.]),
index eb90e3e495d865fc9317270ae0d115a1e1dd13c3..0e5fa24be175dc95c58bc05bdc48e690bab7389a 100644 (file)
@@ -1,6 +1,5 @@
-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 \
index aa06dd54874edfc0f221a293e4f2380164ce9e41..8225ed8df7ad34a039a633959cbb43c0b0fa8801 100644 (file)
@@ -37,6 +37,7 @@
 #include <net/if.h>
 
 #include "error.h"
+#include "config.h"
 
 #include <lxc/lxc.h>
 #include <lxc/log.h>
index c733bff15e72a5f58fbf97523326edc378f184c8..69cf8e6385278df6b22f868a37cb0a3daffe18c4 100644 (file)
@@ -48,6 +48,7 @@
 #include "network.h"
 #include "error.h"
 #include "parse.h"
+#include "config.h"
 
 #include <lxc/lxc.h>
 #include <lxc/log.h>
index 2527c779f114d33f228c5e9d42bda28c0b5c0975..a78aaed170fddd0c13ed4f3455f8502ec157c671 100644 (file)
 #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)
index 63d7c3a1237bf13fe1b8e5f5d6938b6b92d27e2a..d0e7b52d8f17731dd130e1896509499246ee9cb7 100644 (file)
@@ -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)
index 76eaccf7444575e7c9f57dc8d7f37ab43825b6e4..820668b0be95e55e4c7769f107b68d72b2ab32aa 100644 (file)
@@ -31,6 +31,8 @@
 #include <sys/param.h>
 
 #include "error.h"
+#include "config.h"
+
 #include <lxc/lxc.h>
 
 lxc_log_define(lxc_lock, lxc);
index 2fe9f51da2241112786a4088fd15bc1f8b17aa7c..4d0e210b644946519d28f1f2cdef7db2c0bcfa8f 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <lxc.h>
 #include "arguments.h"
+#include "config.h"
 
 lxc_log_define(lxc_checkpoint, lxc);
 
index 22defbcb910239d4bd64019f7ae9d4822e5be104..226c6ec8ca6aa5758311d0b1ca5472d47579d8bf 100644 (file)
@@ -34,6 +34,7 @@
 #include <lxc/lxc.h>
 #include "confile.h"
 #include "arguments.h"
+#include "config.h"
 
 lxc_log_define(lxc_execute, lxc);
 
index 16cbf08a72a09eccac09516222b6dd3ceed6394a..5442dd3b7eecea22509f0f4949c957232b29354c 100644 (file)
@@ -24,7 +24,6 @@
 #define __namespace_h
 
 #include <syscall.h>
-#define _GNU_SOURCE
 #include <sched.h>
 
 #ifndef CLONE_FS
index 1e8b8e159302a3a29f7a458b0ea0a94b9ac8bff1..6125fa36b96e81e7cba7bf82bf6eef42560f0899 100644 (file)
@@ -34,6 +34,7 @@
 #include <lxc/lxc.h>
 #include <lxc/log.h>
 #include "commands.h"
+#include "config.h"
 
 lxc_log_define(lxc_state, lxc);