2 # Process this file with autoconf to produce a configure script.
4 AC_INIT([lxc], [0.6.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])
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 AC_ARG_ENABLE([examples],
29 [AC_HELP_STRING([--disable-examples], [do not install configuration examples])],
30 [], [enable_examples=yes])
32 AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"])
34 AS_AC_EXPAND(PREFIX, $prefix)
35 AS_AC_EXPAND(LIBDIR, $libdir)
36 AS_AC_EXPAND(BINDIR, $bindir)
37 AS_AC_EXPAND(INCLUDEDIR, $includedir)
38 AS_AC_EXPAND(LIBEXECDIR, $libexecdir)
39 AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
40 AS_AC_EXPAND(DATADIR, $datadir)
41 AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
42 AS_AC_EXPAND(DOCDIR, $docdir)
44 AC_ARG_WITH([config-path],
46 [--with-config-path=dir],
47 [lxc configuration repository path]
48 )], [], [with_config_path="${localstatedir}/lib/lxc"])
50 AC_ARG_WITH([rootfs-path],
52 [--with-rootfs-path=dir],
53 [lxc rootfs mount point]
54 )], [], [with_rootfs_path="${libdir}/lxc"])
56 AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
57 AS_AC_EXPAND(LXCPATH, "${with_config_path}")
58 AS_AC_EXPAND(LXCROOTFSMOUNT, "${with_rootfs_path}")
59 AH_TEMPLATE([LXCPATH], [lxc configuration repository])
60 AH_TEMPLATE([LXCLIBEXECDIR], [lxc executable library path])
61 AH_TEMPLATE([LXCROOTFSMOUNT], [lxc default rootfs mount point])
62 AC_DEFINE_UNQUOTED(LXCPATH, "$LXCPATH")
63 AC_DEFINE_UNQUOTED(LXCLIBEXECDIR, "$LIBEXECDIR")
64 AC_DEFINE_UNQUOTED(LXCROOTFSMOUNT, "$LXCROOTFSMOUNT")
66 AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
68 AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
69 [#include <sys/socket.h>
72 AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
73 [#include <sys/types.h>
74 #include <sys/capability.h>])
76 # Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
77 AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
79 AC_CHECK_HEADERS([sys/signalfd.h])
81 AC_PROG_GCC_TRADITIONAL
83 if test "x$GCC" = "xyes"; then
84 CFLAGS="$CFLAGS -Wall"
101 doc/lxc-unfreeze.sgml
110 doc/common_options.sgml
113 doc/examples/Makefile
114 doc/examples/lxc-macvlan.conf
115 doc/examples/lxc-vlan.conf
116 doc/examples/lxc-no-netns.conf
117 doc/examples/lxc-empty-netns.conf
118 doc/examples/lxc-phys.conf
119 doc/examples/lxc-veth.conf
120 doc/examples/lxc-complex.conf
133 src/lxc/lxc-checkconfig
140 AC_CONFIG_COMMANDS([default],[[]],[[]])
143 if test "x$SETCAP" = "xno"; then
149 The setcap binary was not found. This means the tools to set the
150 privilege for the lxc commands are not available, that's ok, but you
151 will need to run these commands as root or install libcap-2.
162 If you wish to have a non root user to use the lxc tools,
163 you can add the needed capabilities to the tools by invoking
164 the 'lxc-setcap' script. To remove the capabilities, use