]> git.proxmox.com Git - mirror_lxc.git/blob - configure.in
Remove annoying compilation message
[mirror_lxc.git] / configure.in
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_INIT([lxc], [0.4.1])
5
6 AC_CONFIG_SRCDIR([configure.in])
7 AC_CONFIG_AUX_DIR([config])
8 AM_CONFIG_HEADER([src/config.h])
9 AM_INIT_AUTOMAKE([-Wno-portability])
10 AC_CANONICAL_HOST
11 AC_PROG_RANLIB
12 AM_PROG_CC_C_O
13 AC_GNU_SOURCE
14 AC_PROG_LIBTOOL
15 AC_CHECK_PROG(SETCAP, setcap, yes, no)
16 AC_CHECK_PROG(DOCBOOK, docbook2man, yes, no)
17 AM_CONDITIONAL(ENABLE_DOCBOOK, test x$DOCBOOK = xyes)
18 PKG_PROG_PKG_CONFIG
19
20 AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found]),
21 [#include <linux/types.h>
22 #include <bits/sockaddr.h>
23 #include <linux/socket.h>])
24 AC_PROG_GCC_TRADITIONAL
25
26 if test "x$GCC" = "xyes"; then
27 CFLAGS="$CFLAGS -Wall"
28 fi
29
30 LXC_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1)
31 LXC_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
32 LXC_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
33
34 AC_ARG_ENABLE(network_destroy, [ --disable-network-destroy disable network destruction at exit [default=no]],, enable_network_destroy=yes)
35 if test "x$enable_network_destroy" = "xyes"; then
36 CFLAGS="$CFLAGS -DNETWORK_DESTROY"
37 fi
38 AC_ARG_ENABLE(test, [ --enable-test compile test program [default=no]],, enable_test=no)
39 AM_CONDITIONAL(ENABLE_TEST, test x$enable_test = xyes)
40
41 AC_SUBST(LXC_MAJOR_VERSION)
42 AC_SUBST(LXC_MINOR_VERSION)
43 AC_SUBST(LXC_MICRO_VERSION)
44
45 AC_CONFIG_FILES([
46 Makefile
47 lxc.spec
48 config/Makefile
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
62 doc/lxc-cgroup.sgml
63 doc/lxc.conf.sgml
64 doc/lxc.sgml
65
66 src/Makefile
67 src/lxc/Makefile
68 src/lxc/lxc-ps
69 src/lxc/lxc-ls
70 src/lxc/lxc-netstat
71 src/lxc/lxc-checkconfig
72 etc/Makefile
73 etc/lxc-macvlan.conf
74 etc/lxc-no-netns.conf
75 etc/lxc-empty-netns.conf
76 etc/lxc-phys.conf
77 etc/lxc-veth.conf
78 etc/lxc-complex-config
79 test/Makefile
80 ])
81 AC_CONFIG_COMMANDS([default],[[]],[[]])
82 AC_OUTPUT
83
84 if test "x$DOCBOOK" = "xno"; then
85 AC_MSG_NOTICE([
86
87 Warning:
88 --------
89 The docbook tool is not installed, the man pages won't be generated.
90 If you want the man pages, install docbook and rerun 'configure'.
91
92 ])
93
94 fi
95
96 if test "x$SETCAP" = "xno"; then
97 AC_MSG_NOTICE([
98
99 Warning:
100 --------
101
102 The libcap-2 is not installed. That means the tools to
103 set the privilege for the lxc commands are not available,
104 that's ok, but you will need to run these commands as root
105
106 ])
107
108 else
109
110 AC_MSG_NOTICE([
111
112 Advice:
113 -------
114
115 When installing the tools, it is adviced to install as
116 root, so the privilege for the commands will be set and
117 they will be usable by non-root user
118
119 make && sudo make install
120
121 ])
122
123 fi