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])
13 AC_CHECK_PROG(SETCAP, setcap, yes, no, $PATH$PATH_SEPARATOR/sbin)
16 [AC_HELP_STRING([--enable-doc], [make mans (require docbook2man installed) [default=auto]])],
17 [], [enable_doc=auto])
19 if test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then
20 AC_CHECK_PROG(have_docbook, [docbook2man], [yes], [no])
22 test "x$have_docbook" = "xno" -a "x$enable_doc" = "xyes" && \
23 AC_MSG_ERROR([docbook2man required by man request, but not found])
26 AM_CONDITIONAL([ENABLE_DOCBOOK], [test "x$have_docbook" = "xyes"])
28 AS_AC_EXPAND(PREFIX, $prefix)
29 AS_AC_EXPAND(LIBDIR, $libdir)
30 AS_AC_EXPAND(BINDIR, $bindir)
31 AS_AC_EXPAND(INCLUDEDIR, $includedir)
32 AS_AC_EXPAND(LIBEXECDIR, $libexecdir)
33 AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
34 AS_AC_EXPAND(DATADIR, $datadir)
35 AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
36 AS_AC_EXPAND(LXCPATH, "${localstatedir}/lib/lxc")
37 AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
39 AH_TEMPLATE([LXCPATH], [lxc configuration repository])
40 AH_TEMPLATE([LXCLIBEXECDIR], [lxc executable library path])
41 AC_DEFINE_UNQUOTED(LXCPATH, "$LXCPATH")
42 AC_DEFINE_UNQUOTED(LXCLIBEXECDIR, "$LIBEXECDIR")
44 AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
46 AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
47 [#include <sys/socket.h>
50 AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
51 [#include <sys/types.h>
52 #include <sys/capability.h>])
54 # Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
55 AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
57 AC_CHECK_HEADERS([sys/signalfd.h])
59 AC_PROG_GCC_TRADITIONAL
61 if test "x$GCC" = "xyes"; then
62 CFLAGS="$CFLAGS -Wall"
65 LXC_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1)
66 LXC_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
67 LXC_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
69 AC_SUBST(LXC_MAJOR_VERSION)
70 AC_SUBST(LXC_MINOR_VERSION)
71 AC_SUBST(LXC_MICRO_VERSION)
95 doc/common_options.sgml
108 src/lxc/lxc-checkconfig
114 etc/lxc-no-netns.conf
115 etc/lxc-empty-netns.conf
118 etc/lxc-complex-config
120 AC_CONFIG_COMMANDS([default],[[]],[[]])
123 if test "x$SETCAP" = "xno"; then
129 The setcap binary was not found. This means the tools to set the
130 privilege for the lxc commands are not available, that's ok, but you
131 will need to run these commands as root or install libcap-2.
142 If you wish to have a non root user to use the lxc tools,
143 you can add the needed capabilities to the tools by invoking
144 the 'lxc-setcap' script. To remove the capabilities, use