]>
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) |
d1de19ab | 16 | AC_CHECK_PROG(DOCBOOK, docbook2man, yes, no) |
17 | AM_CONDITIONAL(ENABLE_DOCBOOK, test x$DOCBOOK = xyes) | |
805415fc | 18 | |
86f7d054 | 19 | AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found]), |
69437d52 | 20 | [#include <linux/types.h> |
21 | #include <bits/sockaddr.h> | |
22 | #include <linux/socket.h>]) | |
5e97c3fc | 23 | AC_PROG_GCC_TRADITIONAL |
24 | ||
25 | if test "x$GCC" = "xyes"; then | |
8642237a | 26 | CFLAGS="$CFLAGS -Wall" |
5e97c3fc | 27 | fi |
28 | ||
65c46aef | 29 | LXC_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1) |
30 | LXC_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2) | |
31 | LXC_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3) | |
32 | ||
b7c9b199 | 33 | AC_ARG_ENABLE(network_destroy, [ --disable-network-destroy disable network destruction at exit [default=no]],, enable_network_destroy=yes) |
34 | if test "x$enable_network_destroy" = "xyes"; then | |
35 | CFLAGS="$CFLAGS -DNETWORK_DESTROY" | |
36 | fi | |
37 | ||
65c46aef | 38 | AC_SUBST(LXC_MAJOR_VERSION) |
39 | AC_SUBST(LXC_MINOR_VERSION) | |
40 | AC_SUBST(LXC_MICRO_VERSION) | |
41 | ||
5e97c3fc | 42 | AC_CONFIG_FILES([ |
43 | Makefile | |
44 | lxc.spec | |
45 | config/Makefile | |
d823d5b9 | 46 | |
47 | doc/Makefile | |
48 | doc/lxc-create.sgml | |
49 | doc/lxc-destroy.sgml | |
50 | doc/lxc-execute.sgml | |
51 | doc/lxc-start.sgml | |
52 | doc/lxc-stop.sgml | |
53 | doc/lxc-freeze.sgml | |
54 | doc/lxc-unfreeze.sgml | |
55 | doc/lxc-monitor.sgml | |
56 | doc/lxc-wait.sgml | |
57 | doc/lxc-ls.sgml | |
58 | doc/lxc-ps.sgml | |
b0e505c9 | 59 | doc/lxc-cgroup.sgml |
8a67a2b2 | 60 | doc/lxc.conf.sgml |
d823d5b9 | 61 | |
5e97c3fc | 62 | src/Makefile |
5e97c3fc | 63 | src/lxc/Makefile |
64 | src/lxc/lxc-ps | |
d823d5b9 | 65 | src/lxc/lxc-ls |
805415fc | 66 | src/lxc/lxc-checkconfig |
5e97c3fc | 67 | etc/Makefile |
68 | etc/lxc-macvlan.conf | |
69 | etc/lxc-no-netns.conf | |
5f58350a | 70 | etc/lxc-empty-netns.conf |
5e97c3fc | 71 | etc/lxc-phys.conf |
72 | etc/lxc-veth.conf | |
73 | etc/lxc-complex-config | |
74 | test/Makefile | |
75 | ]) | |
76 | AC_CONFIG_COMMANDS([default],[[]],[[]]) | |
77 | AC_OUTPUT | |
805415fc | 78 | |
d1de19ab | 79 | if test "x$DOCBOOK" = "xno"; then |
80 | AC_MSG_NOTICE([ | |
81 | ||
82 | Warning: | |
83 | -------- | |
84 | The docbook tool is not installed, the man pages won't be generated. | |
85 | ||
86 | ]) | |
87 | ||
88 | fi | |
89 | ||
805415fc | 90 | if test "x$SETCAP" = "xno"; then |
91 | AC_MSG_NOTICE([ | |
92 | ||
93 | Warning: | |
94 | -------- | |
95 | ||
96 | The libcap-2 is not installed. That means the tools to | |
693dcea5 | 97 | set the privilege for the lxc commands are not available, |
98 | that's ok, but you will need to run these commands as root | |
805415fc | 99 | |
100 | ]) | |
101 | ||
102 | else | |
103 | ||
104 | AC_MSG_NOTICE([ | |
105 | ||
106 | Advice: | |
107 | ------- | |
108 | ||
109 | When installing the tools, it is adviced to install as | |
110 | root, so the privilege for the commands will be set and | |
111 | they will be usable by non-root user | |
112 | ||
113 | make && sudo make install | |
114 | ||
115 | ]) | |
116 | ||
117 | fi |