2 # Process this file with autoconf to produce a configure script.
4 AC_INIT([lxc], [0.7.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)
15 AC_ARG_ENABLE([rpath],
16 [AC_HELP_STRING([--disable-rpath], [do not set rpath in executables])],
17 [], [enable_rpath=yes])
19 AM_CONDITIONAL([ENABLE_RPATH], [test "x$enable_rpath" = "xyes"])
22 [AC_HELP_STRING([--enable-doc], [make mans (require docbook2man installed) [default=auto]])],
23 [], [enable_doc=auto])
25 if test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then
26 AC_CHECK_PROG(have_docbook, [docbook2man], [yes], [no])
28 test "x$have_docbook" = "xno" -a "x$enable_doc" = "xyes" && \
29 AC_MSG_ERROR([docbook2man required by man request, but not found])
32 AM_CONDITIONAL([ENABLE_DOCBOOK], [test "x$have_docbook" = "xyes"])
34 AC_ARG_ENABLE([examples],
35 [AC_HELP_STRING([--disable-examples], [do not install configuration examples])],
36 [], [enable_examples=yes])
38 AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"])
40 AS_AC_EXPAND(PREFIX, $prefix)
41 AS_AC_EXPAND(LIBDIR, $libdir)
42 AS_AC_EXPAND(BINDIR, $bindir)
43 AS_AC_EXPAND(INCLUDEDIR, $includedir)
44 AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
45 AS_AC_EXPAND(DATADIR, $datadir)
46 AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
47 AS_AC_EXPAND(DOCDIR, $docdir)
49 AC_ARG_WITH([config-path],
51 [--with-config-path=dir],
52 [lxc configuration repository path]
53 )], [], [with_config_path=['${localstatedir}/lib/lxc']])
55 AC_ARG_WITH([rootfs-path],
57 [--with-rootfs-path=dir],
58 [lxc rootfs mount point]
59 )], [], [with_rootfs_path=['${libdir}/lxc/rootfs']])
61 AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
63 AC_SUBST(LXCPATH, "${with_config_path}")
64 AC_SUBST(LXCROOTFSMOUNT, "${with_rootfs_path}")
65 AC_SUBST(LXCINITDIR, ['${libdir}/lxc'])
66 AC_SUBST(LXCTEMPLATEDIR, ['${libdir}/lxc/templates'])
68 AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
70 AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
71 [#include <sys/socket.h>
74 AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
75 [#include <sys/types.h>
76 #include <sys/capability.h>])
77 AC_CHECK_LIB(cap,cap_set_proc,caplib=yes,caplib=no)
78 AC_MSG_CHECKING([linux capabilities])
79 if test "x$caplib" = "xyes" ; then
81 AC_MSG_RESULT([$CAP_LIBS])
83 AC_MSG_ERROR([not found])
87 # Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
88 AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
90 AC_CHECK_HEADERS([sys/signalfd.h])
92 AC_PROG_GCC_TRADITIONAL
96 if test "x$GCC" = "xyes"; then
97 CFLAGS="$CFLAGS -Wall"
111 doc/lxc-checkpoint.sgml
116 doc/lxc-unfreeze.sgml
125 doc/common_options.sgml
130 doc/examples/Makefile
131 doc/examples/lxc-macvlan.conf
132 doc/examples/lxc-vlan.conf
133 doc/examples/lxc-no-netns.conf
134 doc/examples/lxc-empty-netns.conf
135 doc/examples/lxc-phys.conf
136 doc/examples/lxc-veth.conf
137 doc/examples/lxc-complex.conf
143 templates/lxc-opensuse
144 templates/lxc-busybox
146 templates/lxc-altlinux
154 src/lxc/lxc-checkconfig
163 AC_CONFIG_COMMANDS([default],[[]],[[]])
166 if test "x$SETCAP" = "xno"; then
172 The setcap binary was not found. This means the tools to set the
173 privilege for the lxc commands are not available, that's ok, but you
174 will need to run these commands as root or install libcap-2.
185 If you wish to have a non root user to use the lxc tools,
186 you can add the needed capabilities to the tools by invoking
187 the 'lxc-setcap' script. To remove the capabilities, use