]>
Commit | Line | Data |
---|---|---|
5e97c3fc | 1 | # -*- Autoconf -*- |
2 | # Process this file with autoconf to produce a configure script. | |
3 | ||
f49d83e9 | 4 | AC_INIT([lxc], [0.6.3]) |
5e97c3fc | 5 | |
f8dafdbb | 6 | AC_CONFIG_SRCDIR([configure.ac]) |
5e97c3fc | 7 | AC_CONFIG_AUX_DIR([config]) |
8 | AM_CONFIG_HEADER([src/config.h]) | |
9 | AM_INIT_AUTOMAKE([-Wno-portability]) | |
10 | AC_CANONICAL_HOST | |
5e97c3fc | 11 | AM_PROG_CC_C_O |
12 | AC_GNU_SOURCE | |
c2cc9f0a | 13 | AC_PROG_LIBTOOL |
e90b6974 | 14 | AC_CHECK_PROG(SETCAP, setcap, yes, no, $PATH$PATH_SEPARATOR/sbin) |
d1de19ab | 15 | AC_CHECK_PROG(DOCBOOK, docbook2man, yes, no) |
16 | AM_CONDITIONAL(ENABLE_DOCBOOK, test x$DOCBOOK = xyes) | |
b6345ba1 DL |
17 | AS_AC_EXPAND(PREFIX, $prefix) |
18 | AS_AC_EXPAND(LIBDIR, $libdir) | |
7ad641d5 | 19 | AS_AC_EXPAND(BINDIR, $bindir) |
b6345ba1 | 20 | AS_AC_EXPAND(INCLUDEDIR, $includedir) |
a25ba7aa | 21 | AS_AC_EXPAND(LIBEXECDIR, $libexecdir) |
7ad641d5 | 22 | AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) |
3eae9733 | 23 | AS_AC_EXPAND(DATADIR, $datadir) |
7ad641d5 | 24 | AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir) |
abf424cf | 25 | AS_AC_EXPAND(LXCPATH, "${localstatedir}/lib/lxc") |
be43f17e | 26 | AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)") |
805415fc | 27 | |
c8c9ce7a | 28 | AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]), |
69437d52 | 29 | [#include <linux/types.h> |
30 | #include <bits/sockaddr.h> | |
31 | #include <linux/socket.h>]) | |
35f549fe | 32 | |
33 | AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]), | |
ddceb1f9 DL |
34 | [#include <sys/types.h> |
35 | #include <sys/capability.h>]) | |
35f549fe | 36 | |
656994bb MH |
37 | # Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP |
38 | AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>]) | |
39 | ||
ff218c25 | 40 | AC_CHECK_HEADERS([sys/signalfd.h]) |
41 | ||
5e97c3fc | 42 | AC_PROG_GCC_TRADITIONAL |
43 | ||
44 | if test "x$GCC" = "xyes"; then | |
8642237a | 45 | CFLAGS="$CFLAGS -Wall" |
5e97c3fc | 46 | fi |
47 | ||
65c46aef | 48 | LXC_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1) |
49 | LXC_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2) | |
50 | LXC_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3) | |
51 | ||
abd4a3b3 | 52 | AC_ARG_ENABLE(test, [ --enable-test compile test program [default=no]],, enable_test=no) |
53 | AM_CONDITIONAL(ENABLE_TEST, test x$enable_test = xyes) | |
b7c9b199 | 54 | |
65c46aef | 55 | AC_SUBST(LXC_MAJOR_VERSION) |
56 | AC_SUBST(LXC_MINOR_VERSION) | |
57 | AC_SUBST(LXC_MICRO_VERSION) | |
58 | ||
5e97c3fc | 59 | AC_CONFIG_FILES([ |
60 | Makefile | |
b6345ba1 | 61 | lxc.pc |
5e97c3fc | 62 | lxc.spec |
63 | config/Makefile | |
d823d5b9 | 64 | |
65 | doc/Makefile | |
66 | doc/lxc-create.sgml | |
67 | doc/lxc-destroy.sgml | |
68 | doc/lxc-execute.sgml | |
69 | doc/lxc-start.sgml | |
70 | doc/lxc-stop.sgml | |
b0a33c1e | 71 | doc/lxc-console.sgml |
d823d5b9 | 72 | doc/lxc-freeze.sgml |
73 | doc/lxc-unfreeze.sgml | |
74 | doc/lxc-monitor.sgml | |
75 | doc/lxc-wait.sgml | |
76 | doc/lxc-ls.sgml | |
77 | doc/lxc-ps.sgml | |
b0e505c9 | 78 | doc/lxc-cgroup.sgml |
8a67a2b2 | 79 | doc/lxc.conf.sgml |
8b8b04f8 | 80 | doc/lxc.sgml |
10fba81b | 81 | doc/common_options.sgml |
99e4008c | 82 | doc/see_also.sgml |
d823d5b9 | 83 | |
c9844b87 | 84 | scripts/Makefile |
85 | scripts/lxc-debian | |
54b1eb68 | 86 | scripts/lxc-fedora |
c9844b87 | 87 | scripts/lxc-sshd |
88 | ||
5e97c3fc | 89 | src/Makefile |
5e97c3fc | 90 | src/lxc/Makefile |
91 | src/lxc/lxc-ps | |
d823d5b9 | 92 | src/lxc/lxc-ls |
9d0195cb | 93 | src/lxc/lxc-netstat |
237315ff DL |
94 | src/lxc/lxc-checkconfig |
95 | src/lxc/lxc-setcap | |
bcd952a1 | 96 | src/lxc/lxc-version |
c9844b87 | 97 | |
5e97c3fc | 98 | etc/Makefile |
99 | etc/lxc-macvlan.conf | |
100 | etc/lxc-no-netns.conf | |
5f58350a | 101 | etc/lxc-empty-netns.conf |
5e97c3fc | 102 | etc/lxc-phys.conf |
103 | etc/lxc-veth.conf | |
104 | etc/lxc-complex-config | |
c9844b87 | 105 | |
5e97c3fc | 106 | test/Makefile |
107 | ]) | |
108 | AC_CONFIG_COMMANDS([default],[[]],[[]]) | |
109 | AC_OUTPUT | |
805415fc | 110 | |
d1de19ab | 111 | if test "x$DOCBOOK" = "xno"; then |
f8dafdbb | 112 | AC_MSG_NOTICE([ |
d1de19ab | 113 | |
114 | Warning: | |
115 | -------- | |
5c320b76 GT |
116 | The docbook tool is not installed, the man pages won't be regenerated. |
117 | If you need to update the manpages, install docbook and rerun 'configure'. | |
d1de19ab | 118 | |
119 | ]) | |
120 | ||
121 | fi | |
122 | ||
805415fc | 123 | if test "x$SETCAP" = "xno"; then |
f8dafdbb | 124 | AC_MSG_NOTICE([ |
805415fc | 125 | |
126 | Warning: | |
127 | -------- | |
128 | ||
87476557 FG |
129 | The setcap binary was not found. This means the tools to set the |
130 | privilege for the lxc commands are not available, that's ok, but you | |
131 | will need to run these commands as root or install libcap-2. | |
805415fc | 132 | |
133 | ]) | |
134 | ||
135 | else | |
136 | ||
f8dafdbb | 137 | AC_MSG_NOTICE([ |
805415fc | 138 | |
139 | Advice: | |
140 | ------- | |
141 | ||
87476557 | 142 | If you wish to have a non root user to use the lxc tools, |
237315ff DL |
143 | you can add the needed capabilities to the tools by invoking |
144 | the 'lxc-setcap' script. To remove the capabilities, use | |
87476557 | 145 | 'lxc-setcap -d'. |
805415fc | 146 | ]) |
147 | ||
148 | fi |