2 # Process this file with autoconf to produce a configure script.
4 AC_INIT([lxc], [0.4.1])
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])
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)
19 AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found]),
20 [#include <linux/types.h>
21 #include <bits/sockaddr.h>
22 #include <linux/socket.h>])
23 AC_PROG_GCC_TRADITIONAL
25 if test "x$GCC" = "xyes"; then
26 CFLAGS="$CFLAGS -Wall"
29 LXC_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1)
30 LXC_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
31 LXC_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
33 AC_ARG_ENABLE(network_destroy, [ --disable-network-destroy disable network destruction at exit [default=no]],, enable_network_destroy=yes)
34 if test "x$enable_network_destroy" = "xyes"; then
35 CFLAGS="$CFLAGS -DNETWORK_DESTROY"
38 AC_SUBST(LXC_MAJOR_VERSION)
39 AC_SUBST(LXC_MINOR_VERSION)
40 AC_SUBST(LXC_MICRO_VERSION)
66 src/lxc/lxc-checkconfig
70 etc/lxc-empty-netns.conf
73 etc/lxc-complex-config
76 AC_CONFIG_COMMANDS([default],[[]],[[]])
79 if test "x$DOCBOOK" = "xno"; then
84 The docbook tool is not installed, the man pages won't be generated.
90 if test "x$SETCAP" = "xno"; then
96 The libcap-2 is not installed. That means the tools to
97 set the privilege for the lxc commands are not available,
98 that's ok, but you will need to run these commands as root
109 When installing the tools, it is adviced to install as
110 root, so the privilege for the commands will be set and
111 they will be usable by non-root user
113 make && sudo make install