]> git.proxmox.com Git - mirror_lxc.git/blame - configure.in
liblxc: create a fedore template container
[mirror_lxc.git] / configure.in
CommitLineData
5e97c3fc 1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
b0a33c1e 4AC_INIT([lxc], [0.6.0])
5e97c3fc 5
6AC_CONFIG_SRCDIR([configure.in])
952be76a 7AC_CONFIG_MACRO_DIR([m4])
5e97c3fc 8AC_CONFIG_AUX_DIR([config])
9AM_CONFIG_HEADER([src/config.h])
10AM_INIT_AUTOMAKE([-Wno-portability])
11AC_CANONICAL_HOST
5e97c3fc 12AM_PROG_CC_C_O
13AC_GNU_SOURCE
c2cc9f0a 14AC_PROG_LIBTOOL
693dcea5 15AC_CHECK_PROG(SETCAP, setcap, yes, no)
d1de19ab 16AC_CHECK_PROG(DOCBOOK, docbook2man, yes, no)
17AM_CONDITIONAL(ENABLE_DOCBOOK, test x$DOCBOOK = xyes)
7ad641d5 18AS_AC_EXPAND(BINDIR, $bindir)
19AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
20AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
805415fc 21
86f7d054 22AC_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
27AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
28[#include <sys/capability.h>])
29
ff218c25 30AC_CHECK_HEADERS([sys/signalfd.h])
31
5e97c3fc 32AC_PROG_GCC_TRADITIONAL
33
34if test "x$GCC" = "xyes"; then
8642237a 35 CFLAGS="$CFLAGS -Wall"
5e97c3fc 36fi
37
65c46aef 38LXC_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1)
39LXC_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
40LXC_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
41
cf445de3 42AC_ARG_WITH([kernel-release],
43 [AC_HELP_STRING([--with-kernel-release=RELEASE],
44 [specify the "uname -r"-value to build for])],
45 [KERNEL_RELEASE="${withval}"],
46 [KERNEL_RELEASE=`uname -r`])
47
48AX_COMPARE_VERSION([$KERNEL_RELEASE], [ge], [2.6.29],
49 AC_MSG_NOTICE([network autodestroy: yes]),
50 AC_MSG_NOTICE([network autodestroy: no]))
51
52if test ${ax_compare_version} != "true"; then
b7c9b199 53 CFLAGS="$CFLAGS -DNETWORK_DESTROY"
54fi
35f549fe 55
abd4a3b3 56AC_ARG_ENABLE(test, [ --enable-test compile test program [default=no]],, enable_test=no)
57AM_CONDITIONAL(ENABLE_TEST, test x$enable_test = xyes)
b7c9b199 58
65c46aef 59AC_SUBST(LXC_MAJOR_VERSION)
60AC_SUBST(LXC_MINOR_VERSION)
61AC_SUBST(LXC_MICRO_VERSION)
62
5e97c3fc 63AC_CONFIG_FILES([
64 Makefile
65 lxc.spec
66 config/Makefile
d823d5b9 67
68 doc/Makefile
69 doc/lxc-create.sgml
70 doc/lxc-destroy.sgml
71 doc/lxc-execute.sgml
72 doc/lxc-start.sgml
73 doc/lxc-stop.sgml
b0a33c1e 74 doc/lxc-console.sgml
d823d5b9 75 doc/lxc-freeze.sgml
76 doc/lxc-unfreeze.sgml
77 doc/lxc-monitor.sgml
78 doc/lxc-wait.sgml
79 doc/lxc-ls.sgml
80 doc/lxc-ps.sgml
b0e505c9 81 doc/lxc-cgroup.sgml
8a67a2b2 82 doc/lxc.conf.sgml
8b8b04f8 83 doc/lxc.sgml
d823d5b9 84
c9844b87 85 scripts/Makefile
86 scripts/lxc-debian
54b1eb68 87 scripts/lxc-fedora
c9844b87 88 scripts/lxc-sshd
89
5e97c3fc 90 src/Makefile
5e97c3fc 91 src/lxc/Makefile
92 src/lxc/lxc-ps
d823d5b9 93 src/lxc/lxc-ls
9d0195cb 94 src/lxc/lxc-netstat
805415fc 95 src/lxc/lxc-checkconfig
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
111 AC_MSG_NOTICE([
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
123 AC_MSG_NOTICE([
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
136 AC_MSG_NOTICE([
137
138Advice:
139-------
140
141When installing the tools, it is adviced to install as
142root, so the privilege for the commands will be set and
143they will be usable by non-root user
144
145 make && sudo make install
146
147])
148
149fi