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