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