]>
Commit | Line | Data |
---|---|---|
5e97c3fc | 1 | # -*- Autoconf -*- |
2 | # Process this file with autoconf to produce a configure script. | |
3 | ||
b7c9b199 | 4 | AC_INIT([lxc], [0.4.1]) |
5e97c3fc | 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 | |
c2cc9f0a | 14 | AC_PROG_LIBTOOL |
693dcea5 | 15 | AC_CHECK_PROG(SETCAP, setcap, yes, no) |
805415fc | 16 | |
86f7d054 | 17 | AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found]), |
69437d52 | 18 | [#include <linux/types.h> |
19 | #include <bits/sockaddr.h> | |
20 | #include <linux/socket.h>]) | |
5e97c3fc | 21 | AC_PROG_GCC_TRADITIONAL |
22 | ||
23 | if test "x$GCC" = "xyes"; then | |
8642237a | 24 | CFLAGS="$CFLAGS -Wall" |
5e97c3fc | 25 | fi |
26 | ||
65c46aef | 27 | LXC_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1) |
28 | LXC_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2) | |
29 | LXC_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3) | |
30 | ||
b7c9b199 | 31 | AC_ARG_ENABLE(network_destroy, [ --disable-network-destroy disable network destruction at exit [default=no]],, enable_network_destroy=yes) |
32 | if test "x$enable_network_destroy" = "xyes"; then | |
33 | CFLAGS="$CFLAGS -DNETWORK_DESTROY" | |
34 | fi | |
35 | ||
65c46aef | 36 | AC_SUBST(LXC_MAJOR_VERSION) |
37 | AC_SUBST(LXC_MINOR_VERSION) | |
38 | AC_SUBST(LXC_MICRO_VERSION) | |
39 | ||
5e97c3fc | 40 | AC_CONFIG_FILES([ |
41 | Makefile | |
42 | lxc.spec | |
43 | config/Makefile | |
44 | src/Makefile | |
5e97c3fc | 45 | src/lxc/Makefile |
46 | src/lxc/lxc-ps | |
805415fc | 47 | src/lxc/lxc-checkconfig |
5e97c3fc | 48 | etc/Makefile |
49 | etc/lxc-macvlan.conf | |
50 | etc/lxc-no-netns.conf | |
5f58350a | 51 | etc/lxc-empty-netns.conf |
5e97c3fc | 52 | etc/lxc-phys.conf |
53 | etc/lxc-veth.conf | |
54 | etc/lxc-complex-config | |
55 | test/Makefile | |
56 | ]) | |
57 | AC_CONFIG_COMMANDS([default],[[]],[[]]) | |
58 | AC_OUTPUT | |
805415fc | 59 | |
60 | if test "x$SETCAP" = "xno"; then | |
61 | AC_MSG_NOTICE([ | |
62 | ||
63 | Warning: | |
64 | -------- | |
65 | ||
66 | The libcap-2 is not installed. That means the tools to | |
693dcea5 | 67 | set the privilege for the lxc commands are not available, |
68 | that's ok, but you will need to run these commands as root | |
805415fc | 69 | |
70 | ]) | |
71 | ||
72 | else | |
73 | ||
74 | AC_MSG_NOTICE([ | |
75 | ||
76 | Advice: | |
77 | ------- | |
78 | ||
79 | When installing the tools, it is adviced to install as | |
80 | root, so the privilege for the commands will be set and | |
81 | they will be usable by non-root user | |
82 | ||
83 | make && sudo make install | |
84 | ||
85 | ]) | |
86 | ||
87 | fi |