2 # Process this file with autoconf to produce a configure script.
4 AC_INIT([lxc], [0.6.3])
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])
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)")
28 AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
30 AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
31 [#include <sys/socket.h>
34 AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
35 [#include <sys/types.h>
36 #include <sys/capability.h>])
38 # Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
39 AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
41 AC_CHECK_HEADERS([sys/signalfd.h])
43 AC_PROG_GCC_TRADITIONAL
45 if test "x$GCC" = "xyes"; then
46 CFLAGS="$CFLAGS -Wall"
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)
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)
56 AC_SUBST(LXC_MAJOR_VERSION)
57 AC_SUBST(LXC_MINOR_VERSION)
58 AC_SUBST(LXC_MICRO_VERSION)
82 doc/common_options.sgml
95 src/lxc/lxc-checkconfig
101 etc/lxc-no-netns.conf
102 etc/lxc-empty-netns.conf
105 etc/lxc-complex-config
109 AC_CONFIG_COMMANDS([default],[[]],[[]])
112 if test "x$DOCBOOK" = "xno"; then
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'.
124 if test "x$SETCAP" = "xno"; then
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.
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