]> git.proxmox.com Git - mirror_lxc.git/blob - configure.ac
lxc_af_unix_rcv_credential to report rcvd length
[mirror_lxc.git] / configure.ac
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_INIT([lxc], [0.6.3])
5
6 AC_CONFIG_SRCDIR([configure.ac])
7 AC_CONFIG_AUX_DIR([config])
8 AM_CONFIG_HEADER([src/config.h])
9 AM_INIT_AUTOMAKE([-Wno-portability])
10 AC_CANONICAL_HOST
11 AM_PROG_CC_C_O
12 AC_GNU_SOURCE
13 AC_PROG_LIBTOOL
14 AC_CHECK_PROG(SETCAP, setcap, yes, no, $PATH$PATH_SEPARATOR/sbin)
15 AC_CHECK_PROG(DOCBOOK, docbook2man, yes, no)
16 AM_CONDITIONAL(ENABLE_DOCBOOK, test x$DOCBOOK = xyes)
17 AS_AC_EXPAND(PREFIX, $prefix)
18 AS_AC_EXPAND(LIBDIR, $libdir)
19 AS_AC_EXPAND(BINDIR, $bindir)
20 AS_AC_EXPAND(INCLUDEDIR, $includedir)
21 AS_AC_EXPAND(LIBEXECDIR, $libexecdir)
22 AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
23 AS_AC_EXPAND(DATADIR, $datadir)
24 AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
25 AS_AC_EXPAND(LXCPATH, "${localstatedir}/lib/lxc")
26 AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
27
28 AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
29 [],
30 AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
31 [#include <sys/socket.h>
32 ])
33
34 AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
35 [#include <sys/types.h>
36 #include <sys/capability.h>])
37
38 # Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
39 AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
40
41 AC_CHECK_HEADERS([sys/signalfd.h])
42
43 AC_PROG_GCC_TRADITIONAL
44
45 if test "x$GCC" = "xyes"; then
46 CFLAGS="$CFLAGS -Wall"
47 fi
48
49 LXC_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1)
50 LXC_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
51 LXC_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
52
53 AC_ARG_ENABLE(test, [ --enable-test compile test program [default=no]],, enable_test=no)
54 AM_CONDITIONAL(ENABLE_TEST, test x$enable_test = xyes)
55
56 AC_SUBST(LXC_MAJOR_VERSION)
57 AC_SUBST(LXC_MINOR_VERSION)
58 AC_SUBST(LXC_MICRO_VERSION)
59
60 AC_CONFIG_FILES([
61 Makefile
62 lxc.pc
63 lxc.spec
64 config/Makefile
65
66 doc/Makefile
67 doc/lxc-create.sgml
68 doc/lxc-destroy.sgml
69 doc/lxc-execute.sgml
70 doc/lxc-start.sgml
71 doc/lxc-stop.sgml
72 doc/lxc-console.sgml
73 doc/lxc-freeze.sgml
74 doc/lxc-unfreeze.sgml
75 doc/lxc-monitor.sgml
76 doc/lxc-wait.sgml
77 doc/lxc-ls.sgml
78 doc/lxc-ps.sgml
79 doc/lxc-cgroup.sgml
80 doc/lxc.conf.sgml
81 doc/lxc.sgml
82 doc/common_options.sgml
83 doc/see_also.sgml
84
85 scripts/Makefile
86 scripts/lxc-debian
87 scripts/lxc-fedora
88 scripts/lxc-sshd
89
90 src/Makefile
91 src/lxc/Makefile
92 src/lxc/lxc-ps
93 src/lxc/lxc-ls
94 src/lxc/lxc-netstat
95 src/lxc/lxc-checkconfig
96 src/lxc/lxc-setcap
97 src/lxc/lxc-version
98
99 etc/Makefile
100 etc/lxc-macvlan.conf
101 etc/lxc-no-netns.conf
102 etc/lxc-empty-netns.conf
103 etc/lxc-phys.conf
104 etc/lxc-veth.conf
105 etc/lxc-complex-config
106
107 test/Makefile
108 ])
109 AC_CONFIG_COMMANDS([default],[[]],[[]])
110 AC_OUTPUT
111
112 if test "x$DOCBOOK" = "xno"; then
113 AC_MSG_NOTICE([
114
115 Warning:
116 --------
117 The docbook tool is not installed, the man pages won't be regenerated.
118 If you need to update the manpages, install docbook and rerun 'configure'.
119
120 ])
121
122 fi
123
124 if test "x$SETCAP" = "xno"; then
125 AC_MSG_NOTICE([
126
127 Warning:
128 --------
129
130 The setcap binary was not found. This means the tools to set the
131 privilege for the lxc commands are not available, that's ok, but you
132 will need to run these commands as root or install libcap-2.
133
134 ])
135
136 else
137
138 AC_MSG_NOTICE([
139
140 Advice:
141 -------
142
143 If you wish to have a non root user to use the lxc tools,
144 you can add the needed capabilities to the tools by invoking
145 the 'lxc-setcap' script. To remove the capabilities, use
146 'lxc-setcap -d'.
147 ])
148
149 fi