2
# Process this file with autoconf to produce a configure script.
4
AC_INIT([lxc], [0.8.0-rc1])
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"])
21
AC_ARG_ENABLE([seccomp],
22
[AC_HELP_STRING([--enable-seccomp], [enable seccomp])],
23
[], [enable_seccomp=check])
26
[AC_HELP_STRING([--enable-doc], [make mans (require docbook2man installed) [default=auto]])],
27
[], [enable_doc=auto])
29
if test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then
30
AC_CHECK_PROG(have_docbook, [docbook2man], [yes], [no])
32
test "x$have_docbook" = "xno" -a "x$enable_doc" = "xyes" && \
33
AC_MSG_ERROR([docbook2man required by man request, but not found])
36
if test "$enable_seccomp" = "check" ; then
37
AC_CHECK_LIB([seccomp],[seccomp_init],[enable_seccomp=yes], [enable_seccomp=no])
40
AM_CONDITIONAL([ENABLE_SECCOMP], [test "x$enable_seccomp" = "xyes"])
42
AM_COND_IF([ENABLE_SECCOMP],
43
[AC_CHECK_HEADER([seccomp.h],[],[AC_MSG_ERROR([You must install the seccomp development package in order to compile lxc])])
44
AC_CHECK_LIB([seccomp], [seccomp_init],[],[AC_MSG_ERROR([You must install the seccomp development package in order to compile lxc])])
45
AC_DEFINE_UNQUOTED([ENABLE_SECCOMP], 1, [Seccomp is available])
46
AC_SUBST([SECCOMP_LIBS], [-lseccomp])])
48
AM_CONDITIONAL([ENABLE_DOCBOOK], [test "x$have_docbook" = "xyes"])
50
AC_ARG_ENABLE([examples],
51
[AC_HELP_STRING([--disable-examples], [do not install configuration examples])],
52
[], [enable_examples=yes])
54
AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"])
56
AS_AC_EXPAND(PREFIX, $prefix)
57
AS_AC_EXPAND(LIBDIR, $libdir)
58
AS_AC_EXPAND(BINDIR, $bindir)
59
AS_AC_EXPAND(INCLUDEDIR, $includedir)
60
AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
61
AS_AC_EXPAND(DATADIR, $datadir)
62
AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
63
AS_AC_EXPAND(DOCDIR, $docdir)
65
AC_ARG_WITH([config-path],
67
[--with-config-path=dir],
68
[lxc configuration repository path]
69
)], [], [with_config_path=['${localstatedir}/lib/lxc']])
71
AC_ARG_WITH([rootfs-path],
73
[--with-rootfs-path=dir],
74
[lxc rootfs mount point]
75
)], [], [with_rootfs_path=['${libdir}/lxc/rootfs']])
77
AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
79
AC_SUBST(LXCPATH, "${with_config_path}")
80
AC_SUBST(LXCROOTFSMOUNT, "${with_rootfs_path}")
81
AC_SUBST(LXCINITDIR, ['${libexecdir}'])
82
AC_SUBST(LXCTEMPLATEDIR, ['/usr/share/lxc/templates'])
84
AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
86
AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
87
[#include <sys/socket.h>
90
AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
91
[#include <sys/types.h>
92
#include <sys/capability.h>])
93
AC_CHECK_LIB(cap,cap_set_proc,caplib=yes,caplib=no)
94
AC_MSG_CHECKING([linux capabilities])
95
if test "x$caplib" = "xyes" ; then
97
AC_MSG_RESULT([$CAP_LIBS])
99
AC_MSG_ERROR([not found])
103
# Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
104
AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
106
AC_CHECK_HEADERS([sys/signalfd.h])
108
AC_PROG_GCC_TRADITIONAL
112
if test "x$GCC" = "xyes"; then
113
CFLAGS="$CFLAGS -Wall"
127
doc/lxc-checkpoint.sgml
132
doc/lxc-unfreeze.sgml
142
doc/common_options.sgml
147
doc/examples/Makefile
148
doc/examples/lxc-macvlan.conf
149
doc/examples/lxc-vlan.conf
150
doc/examples/lxc-no-netns.conf
151
doc/examples/lxc-empty-netns.conf
152
doc/examples/lxc-phys.conf
153
doc/examples/lxc-veth.conf
154
doc/examples/lxc-complex.conf
160
templates/lxc-ubuntu-cloud
161
templates/lxc-opensuse
162
templates/lxc-busybox
164
templates/lxc-altlinux
166
templates/lxc-archlinux
173
src/lxc/lxc-checkconfig
183
AC_CONFIG_COMMANDS([default],[[]],[[]])
186
if test "x$SETCAP" = "xno"; then
192
The setcap binary was not found. This means the tools to set the
193
privilege for the lxc commands are not available, that's ok, but you
194
will need to run these commands as root or install libcap-2.
205
If you wish to have a non root user to use the lxc tools,
206
you can add the needed capabilities to the tools by invoking
207
the 'lxc-setcap' script. To remove the capabilities, use