]> git.proxmox.com Git - mirror_lxc.git/blob - configure.in
Give the ability to non-root user to play with the containers. This feature
[mirror_lxc.git] / configure.in
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_INIT([lxc], [0.4.0])
5
6 AC_CONFIG_SRCDIR([configure.in])
7 AC_CONFIG_AUX_DIR([config])
8 AM_CONFIG_HEADER([src/config.h])
9 AM_INIT_AUTOMAKE([-Wno-portability])
10 AC_CANONICAL_HOST
11 AC_PROG_RANLIB
12 AM_PROG_CC_C_O
13 AC_GNU_SOURCE
14 AC_PROG_LIBTOOL
15 AC_CHECK_PROG(SETCAP, setcap, yes, no, "/usr/sbin")
16
17 AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found]),
18 [#include <linux/types.h>
19 #include <bits/sockaddr.h>
20 #include <linux/socket.h>])
21 AC_PROG_GCC_TRADITIONAL
22
23 if test "x$GCC" = "xyes"; then
24 CFLAGS="$CFLAGS -Wall"
25 fi
26
27 AC_CONFIG_FILES([
28 Makefile
29 lxc.spec
30 config/Makefile
31 src/Makefile
32 src/lxc/Makefile
33 src/lxc/lxc-ps
34 src/lxc/lxc-checkconfig
35 etc/Makefile
36 etc/lxc-macvlan.conf
37 etc/lxc-no-netns.conf
38 etc/lxc-empty-netns.conf
39 etc/lxc-phys.conf
40 etc/lxc-veth.conf
41 etc/lxc-complex-config
42 test/Makefile
43 ])
44 AC_CONFIG_COMMANDS([default],[[]],[[]])
45 AC_OUTPUT
46
47 if test "x$SETCAP" = "xno"; then
48 AC_MSG_NOTICE([
49
50 Warning:
51 --------
52
53 The libcap-2 is not installed. That means the tools to
54 set the privilege for the lxc commands are not available
55 and you will need to run these commands as root
56
57 ])
58
59 else
60
61 AC_MSG_NOTICE([
62
63 Advice:
64 -------
65
66 When installing the tools, it is adviced to install as
67 root, so the privilege for the commands will be set and
68 they will be usable by non-root user
69
70 make && sudo make install
71
72 ])
73
74 fi