]>
Commit | Line | Data |
---|---|---|
5e97c3fc | 1 | # -*- Autoconf -*- |
2 | # Process this file with autoconf to produce a configure script. | |
3 | ||
35f549fe | 4 | AC_INIT([lxc], [0.5.1]) |
5e97c3fc | 5 | |
6 | AC_CONFIG_SRCDIR([configure.in]) | |
952be76a | 7 | AC_CONFIG_MACRO_DIR([m4]) |
5e97c3fc | 8 | AC_CONFIG_AUX_DIR([config]) |
9 | AM_CONFIG_HEADER([src/config.h]) | |
10 | AM_INIT_AUTOMAKE([-Wno-portability]) | |
11 | AC_CANONICAL_HOST | |
5e97c3fc | 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) | |
7ad641d5 | 18 | AS_AC_EXPAND(BINDIR, $bindir) |
19 | AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) | |
20 | AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir) | |
805415fc | 21 | |
86f7d054 | 22 | AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found]), |
69437d52 | 23 | [#include <linux/types.h> |
24 | #include <bits/sockaddr.h> | |
25 | #include <linux/socket.h>]) | |
35f549fe | 26 | |
27 | AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]), | |
28 | [#include <sys/capability.h>]) | |
29 | ||
5e97c3fc | 30 | AC_PROG_GCC_TRADITIONAL |
31 | ||
32 | if test "x$GCC" = "xyes"; then | |
8642237a | 33 | CFLAGS="$CFLAGS -Wall" |
5e97c3fc | 34 | fi |
35 | ||
65c46aef | 36 | LXC_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1) |
37 | LXC_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2) | |
38 | LXC_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3) | |
39 | ||
b7c9b199 | 40 | AC_ARG_ENABLE(network_destroy, [ --disable-network-destroy disable network destruction at exit [default=no]],, enable_network_destroy=yes) |
41 | if test "x$enable_network_destroy" = "xyes"; then | |
42 | CFLAGS="$CFLAGS -DNETWORK_DESTROY" | |
43 | fi | |
35f549fe | 44 | |
abd4a3b3 | 45 | AC_ARG_ENABLE(test, [ --enable-test compile test program [default=no]],, enable_test=no) |
46 | AM_CONDITIONAL(ENABLE_TEST, test x$enable_test = xyes) | |
b7c9b199 | 47 | |
65c46aef | 48 | AC_SUBST(LXC_MAJOR_VERSION) |
49 | AC_SUBST(LXC_MINOR_VERSION) | |
50 | AC_SUBST(LXC_MICRO_VERSION) | |
51 | ||
5e97c3fc | 52 | AC_CONFIG_FILES([ |
53 | Makefile | |
54 | lxc.spec | |
55 | config/Makefile | |
d823d5b9 | 56 | |
57 | doc/Makefile | |
58 | doc/lxc-create.sgml | |
59 | doc/lxc-destroy.sgml | |
60 | doc/lxc-execute.sgml | |
61 | doc/lxc-start.sgml | |
62 | doc/lxc-stop.sgml | |
63 | doc/lxc-freeze.sgml | |
64 | doc/lxc-unfreeze.sgml | |
65 | doc/lxc-monitor.sgml | |
66 | doc/lxc-wait.sgml | |
67 | doc/lxc-ls.sgml | |
68 | doc/lxc-ps.sgml | |
b0e505c9 | 69 | doc/lxc-cgroup.sgml |
8a67a2b2 | 70 | doc/lxc.conf.sgml |
8b8b04f8 | 71 | doc/lxc.sgml |
d823d5b9 | 72 | |
c9844b87 | 73 | scripts/Makefile |
74 | scripts/lxc-debian | |
75 | scripts/lxc-sshd | |
76 | ||
5e97c3fc | 77 | src/Makefile |
5e97c3fc | 78 | src/lxc/Makefile |
79 | src/lxc/lxc-ps | |
d823d5b9 | 80 | src/lxc/lxc-ls |
9d0195cb | 81 | src/lxc/lxc-netstat |
805415fc | 82 | src/lxc/lxc-checkconfig |
c9844b87 | 83 | |
5e97c3fc | 84 | etc/Makefile |
85 | etc/lxc-macvlan.conf | |
86 | etc/lxc-no-netns.conf | |
5f58350a | 87 | etc/lxc-empty-netns.conf |
5e97c3fc | 88 | etc/lxc-phys.conf |
89 | etc/lxc-veth.conf | |
90 | etc/lxc-complex-config | |
c9844b87 | 91 | |
5e97c3fc | 92 | test/Makefile |
93 | ]) | |
94 | AC_CONFIG_COMMANDS([default],[[]],[[]]) | |
95 | AC_OUTPUT | |
805415fc | 96 | |
d1de19ab | 97 | if test "x$DOCBOOK" = "xno"; then |
98 | AC_MSG_NOTICE([ | |
99 | ||
100 | Warning: | |
101 | -------- | |
102 | The docbook tool is not installed, the man pages won't be generated. | |
8b8b04f8 | 103 | If you want the man pages, install docbook and rerun 'configure'. |
d1de19ab | 104 | |
105 | ]) | |
106 | ||
107 | fi | |
108 | ||
805415fc | 109 | if test "x$SETCAP" = "xno"; then |
110 | AC_MSG_NOTICE([ | |
111 | ||
112 | Warning: | |
113 | -------- | |
114 | ||
115 | The libcap-2 is not installed. That means the tools to | |
693dcea5 | 116 | set the privilege for the lxc commands are not available, |
117 | that's ok, but you will need to run these commands as root | |
805415fc | 118 | |
119 | ]) | |
120 | ||
121 | else | |
122 | ||
123 | AC_MSG_NOTICE([ | |
124 | ||
125 | Advice: | |
126 | ------- | |
127 | ||
128 | When installing the tools, it is adviced to install as | |
129 | root, so the privilege for the commands will be set and | |
130 | they will be usable by non-root user | |
131 | ||
132 | make && sudo make install | |
133 | ||
134 | ]) | |
135 | ||
136 | fi |