]> git.proxmox.com Git - mirror_lxc.git/blame - configure.in
Added a script directory for containers creation helper scripts
[mirror_lxc.git] / configure.in
CommitLineData
5e97c3fc 1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
b7c9b199 4AC_INIT([lxc], [0.4.1])
5e97c3fc 5
6AC_CONFIG_SRCDIR([configure.in])
7AC_CONFIG_AUX_DIR([config])
8AM_CONFIG_HEADER([src/config.h])
9AM_INIT_AUTOMAKE([-Wno-portability])
10AC_CANONICAL_HOST
11AC_PROG_RANLIB
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)
6373bd68 18PKG_PROG_PKG_CONFIG
805415fc 19
86f7d054 20AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found]),
69437d52 21[#include <linux/types.h>
22#include <bits/sockaddr.h>
23#include <linux/socket.h>])
5e97c3fc 24AC_PROG_GCC_TRADITIONAL
25
26if test "x$GCC" = "xyes"; then
8642237a 27 CFLAGS="$CFLAGS -Wall"
5e97c3fc 28fi
29
65c46aef 30LXC_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1)
31LXC_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
32LXC_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
33
b7c9b199 34AC_ARG_ENABLE(network_destroy, [ --disable-network-destroy disable network destruction at exit [default=no]],, enable_network_destroy=yes)
35if test "x$enable_network_destroy" = "xyes"; then
36 CFLAGS="$CFLAGS -DNETWORK_DESTROY"
37fi
abd4a3b3 38AC_ARG_ENABLE(test, [ --enable-test compile test program [default=no]],, enable_test=no)
39AM_CONDITIONAL(ENABLE_TEST, test x$enable_test = xyes)
b7c9b199 40
65c46aef 41AC_SUBST(LXC_MAJOR_VERSION)
42AC_SUBST(LXC_MINOR_VERSION)
43AC_SUBST(LXC_MICRO_VERSION)
44
5e97c3fc 45AC_CONFIG_FILES([
46 Makefile
47 lxc.spec
48 config/Makefile
d823d5b9 49
50 doc/Makefile
51 doc/lxc-create.sgml
52 doc/lxc-destroy.sgml
53 doc/lxc-execute.sgml
54 doc/lxc-start.sgml
55 doc/lxc-stop.sgml
56 doc/lxc-freeze.sgml
57 doc/lxc-unfreeze.sgml
58 doc/lxc-monitor.sgml
59 doc/lxc-wait.sgml
60 doc/lxc-ls.sgml
61 doc/lxc-ps.sgml
b0e505c9 62 doc/lxc-cgroup.sgml
8a67a2b2 63 doc/lxc.conf.sgml
8b8b04f8 64 doc/lxc.sgml
d823d5b9 65
c9844b87 66 scripts/Makefile
67 scripts/lxc-debian
68 scripts/lxc-sshd
69
5e97c3fc 70 src/Makefile
5e97c3fc 71 src/lxc/Makefile
72 src/lxc/lxc-ps
d823d5b9 73 src/lxc/lxc-ls
9d0195cb 74 src/lxc/lxc-netstat
805415fc 75 src/lxc/lxc-checkconfig
c9844b87 76
5e97c3fc 77 etc/Makefile
78 etc/lxc-macvlan.conf
79 etc/lxc-no-netns.conf
5f58350a 80 etc/lxc-empty-netns.conf
5e97c3fc 81 etc/lxc-phys.conf
82 etc/lxc-veth.conf
83 etc/lxc-complex-config
c9844b87 84
5e97c3fc 85 test/Makefile
86])
87AC_CONFIG_COMMANDS([default],[[]],[[]])
88AC_OUTPUT
805415fc 89
d1de19ab 90if test "x$DOCBOOK" = "xno"; then
91 AC_MSG_NOTICE([
92
93Warning:
94--------
95The docbook tool is not installed, the man pages won't be generated.
8b8b04f8 96If you want the man pages, install docbook and rerun 'configure'.
d1de19ab 97
98])
99
100fi
101
805415fc 102if test "x$SETCAP" = "xno"; then
103 AC_MSG_NOTICE([
104
105Warning:
106--------
107
108The libcap-2 is not installed. That means the tools to
693dcea5 109set the privilege for the lxc commands are not available,
110that's ok, but you will need to run these commands as root
805415fc 111
112])
113
114else
115
116 AC_MSG_NOTICE([
117
118Advice:
119-------
120
121When installing the tools, it is adviced to install as
122root, so the privilege for the commands will be set and
123they will be usable by non-root user
124
125 make && sudo make install
126
127])
128
129fi