]> git.proxmox.com Git - mirror_lxc.git/blame - configure.ac
don't remove the autoconf generated files
[mirror_lxc.git] / configure.ac
CommitLineData
5e97c3fc 1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
5b2b6e7e 4AC_INIT([lxc], [0.6.2])
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
c2cc9f0a 13AC_PROG_LIBTOOL
693dcea5 14AC_CHECK_PROG(SETCAP, setcap, yes, no)
d1de19ab 15AC_CHECK_PROG(DOCBOOK, docbook2man, yes, no)
16AM_CONDITIONAL(ENABLE_DOCBOOK, test x$DOCBOOK = xyes)
7ad641d5 17AS_AC_EXPAND(BINDIR, $bindir)
a25ba7aa 18AS_AC_EXPAND(LIBEXECDIR, $libexecdir)
7ad641d5 19AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
20AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
abf424cf 21AS_AC_EXPAND(LXCPATH, "${localstatedir}/lib/lxc")
be43f17e 22AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
805415fc 23
86f7d054 24AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found]),
69437d52 25[#include <linux/types.h>
26#include <bits/sockaddr.h>
27#include <linux/socket.h>])
35f549fe 28
29AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
30[#include <sys/capability.h>])
31
656994bb
MH
32# Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
33AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
34
ff218c25 35AC_CHECK_HEADERS([sys/signalfd.h])
36
5e97c3fc 37AC_PROG_GCC_TRADITIONAL
38
39if test "x$GCC" = "xyes"; then
8642237a 40 CFLAGS="$CFLAGS -Wall"
5e97c3fc 41fi
42
65c46aef 43LXC_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1)
44LXC_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
45LXC_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
46
cf445de3 47AC_ARG_WITH([kernel-release],
48 [AC_HELP_STRING([--with-kernel-release=RELEASE],
49 [specify the "uname -r"-value to build for])],
50 [KERNEL_RELEASE="${withval}"],
51 [KERNEL_RELEASE=`uname -r`])
52
abd4a3b3 53AC_ARG_ENABLE(test, [ --enable-test compile test program [default=no]],, enable_test=no)
54AM_CONDITIONAL(ENABLE_TEST, test x$enable_test = xyes)
b7c9b199 55
65c46aef 56AC_SUBST(LXC_MAJOR_VERSION)
57AC_SUBST(LXC_MINOR_VERSION)
58AC_SUBST(LXC_MICRO_VERSION)
59
5e97c3fc 60AC_CONFIG_FILES([
61 Makefile
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
c9844b87 96
5e97c3fc 97 etc/Makefile
98 etc/lxc-macvlan.conf
99 etc/lxc-no-netns.conf
5f58350a 100 etc/lxc-empty-netns.conf
5e97c3fc 101 etc/lxc-phys.conf
102 etc/lxc-veth.conf
103 etc/lxc-complex-config
c9844b87 104
5e97c3fc 105 test/Makefile
106])
107AC_CONFIG_COMMANDS([default],[[]],[[]])
108AC_OUTPUT
805415fc 109
d1de19ab 110if test "x$DOCBOOK" = "xno"; then
f8dafdbb 111 AC_MSG_NOTICE([
d1de19ab 112
113Warning:
114--------
115The docbook tool is not installed, the man pages won't be generated.
8b8b04f8 116If you want the man pages, install docbook and rerun 'configure'.
d1de19ab 117
118])
119
120fi
121
805415fc 122if test "x$SETCAP" = "xno"; then
f8dafdbb 123 AC_MSG_NOTICE([
805415fc 124
125Warning:
126--------
127
128The libcap-2 is not installed. That means the tools to
693dcea5 129set the privilege for the lxc commands are not available,
130that's ok, but you will need to run these commands as root
805415fc 131
132])
133
134else
135
f8dafdbb 136 AC_MSG_NOTICE([
805415fc 137
138Advice:
139-------
140
237315ff
DL
141If you which to have a non root user to use the lxc tools,
142you can add the needed capabilities to the tools by invoking
143the 'lxc-setcap' script. To remove the capabilities, use
144'lxc-setcap -d'
805415fc 145])
146
147fi