2008-08-06 14:32:29 +00:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
2009-04-24 11:41:08 +02:00
|
|
|
AC_INIT([lxc], [0.6.2])
|
2008-08-06 14:32:29 +00:00
|
|
|
|
2009-04-26 11:43:41 +02:00
|
|
|
AC_CONFIG_SRCDIR([configure.ac])
|
2008-08-06 14:32:29 +00:00
|
|
|
AC_CONFIG_AUX_DIR([config])
|
|
|
|
AM_CONFIG_HEADER([src/config.h])
|
|
|
|
AM_INIT_AUTOMAKE([-Wno-portability])
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
AM_PROG_CC_C_O
|
|
|
|
AC_GNU_SOURCE
|
2008-09-02 09:48:12 +00:00
|
|
|
AC_PROG_LIBTOOL
|
2008-10-26 22:06:49 +00:00
|
|
|
AC_CHECK_PROG(SETCAP, setcap, yes, no)
|
2008-11-18 14:03:57 +00:00
|
|
|
AC_CHECK_PROG(DOCBOOK, docbook2man, yes, no)
|
|
|
|
AM_CONDITIONAL(ENABLE_DOCBOOK, test x$DOCBOOK = xyes)
|
2008-12-01 11:50:43 +00:00
|
|
|
AS_AC_EXPAND(BINDIR, $bindir)
|
2009-03-18 17:27:27 +00:00
|
|
|
AS_AC_EXPAND(LIBEXECDIR, $libexecdir)
|
2008-12-01 11:50:43 +00:00
|
|
|
AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
|
|
|
|
AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
|
2009-03-30 10:12:13 +01:00
|
|
|
AS_AC_EXPAND(LXCPATH, "${localstatedir}/lib/lxc")
|
2009-05-07 19:36:33 +02:00
|
|
|
AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
|
2008-10-24 20:14:57 +00:00
|
|
|
|
2008-10-08 11:24:31 +00:00
|
|
|
AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found]),
|
2008-10-08 11:39:24 +00:00
|
|
|
[#include <linux/types.h>
|
|
|
|
#include <bits/sockaddr.h>
|
|
|
|
#include <linux/socket.h>])
|
2008-12-09 17:49:21 +00:00
|
|
|
|
|
|
|
AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
|
|
|
|
[#include <sys/capability.h>])
|
|
|
|
|
2009-03-08 17:09:27 +01:00
|
|
|
# Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
|
|
|
|
AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
|
|
|
|
|
2009-02-02 14:50:00 +00:00
|
|
|
AC_CHECK_HEADERS([sys/signalfd.h])
|
|
|
|
|
2008-08-06 14:32:29 +00:00
|
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
|
|
|
|
if test "x$GCC" = "xyes"; then
|
2008-08-06 14:54:00 +00:00
|
|
|
CFLAGS="$CFLAGS -Wall"
|
2008-08-06 14:32:29 +00:00
|
|
|
fi
|
|
|
|
|
2008-10-24 22:08:25 +00:00
|
|
|
LXC_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1)
|
|
|
|
LXC_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
|
|
|
|
LXC_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
|
|
|
|
|
2009-01-25 23:29:24 +00:00
|
|
|
AC_ARG_WITH([kernel-release],
|
|
|
|
[AC_HELP_STRING([--with-kernel-release=RELEASE],
|
|
|
|
[specify the "uname -r"-value to build for])],
|
|
|
|
[KERNEL_RELEASE="${withval}"],
|
|
|
|
[KERNEL_RELEASE=`uname -r`])
|
|
|
|
|
2008-11-20 17:06:02 +00:00
|
|
|
AC_ARG_ENABLE(test, [ --enable-test compile test program [default=no]],, enable_test=no)
|
|
|
|
AM_CONDITIONAL(ENABLE_TEST, test x$enable_test = xyes)
|
2008-11-14 16:16:35 +00:00
|
|
|
|
2008-10-24 22:08:25 +00:00
|
|
|
AC_SUBST(LXC_MAJOR_VERSION)
|
|
|
|
AC_SUBST(LXC_MINOR_VERSION)
|
|
|
|
AC_SUBST(LXC_MICRO_VERSION)
|
|
|
|
|
2008-08-06 14:32:29 +00:00
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
|
|
|
lxc.spec
|
|
|
|
config/Makefile
|
2008-11-18 13:45:49 +00:00
|
|
|
|
|
|
|
doc/Makefile
|
|
|
|
doc/lxc-create.sgml
|
|
|
|
doc/lxc-destroy.sgml
|
|
|
|
doc/lxc-execute.sgml
|
|
|
|
doc/lxc-start.sgml
|
|
|
|
doc/lxc-stop.sgml
|
2009-01-25 21:52:38 +00:00
|
|
|
doc/lxc-console.sgml
|
2008-11-18 13:45:49 +00:00
|
|
|
doc/lxc-freeze.sgml
|
|
|
|
doc/lxc-unfreeze.sgml
|
|
|
|
doc/lxc-monitor.sgml
|
|
|
|
doc/lxc-wait.sgml
|
|
|
|
doc/lxc-ls.sgml
|
|
|
|
doc/lxc-ps.sgml
|
2008-11-18 14:27:12 +00:00
|
|
|
doc/lxc-cgroup.sgml
|
2008-11-19 16:58:09 +00:00
|
|
|
doc/lxc.conf.sgml
|
2008-11-20 15:04:09 +00:00
|
|
|
doc/lxc.sgml
|
2009-05-28 15:32:29 +02:00
|
|
|
doc/see_also.sgml
|
2008-11-18 13:45:49 +00:00
|
|
|
|
2008-11-28 15:36:51 +00:00
|
|
|
scripts/Makefile
|
|
|
|
scripts/lxc-debian
|
2009-03-08 17:09:27 +01:00
|
|
|
scripts/lxc-fedora
|
2008-11-28 15:36:51 +00:00
|
|
|
scripts/lxc-sshd
|
|
|
|
|
2008-08-06 14:32:29 +00:00
|
|
|
src/Makefile
|
|
|
|
src/lxc/Makefile
|
|
|
|
src/lxc/lxc-ps
|
2008-11-18 13:45:49 +00:00
|
|
|
src/lxc/lxc-ls
|
2008-11-21 18:17:38 +00:00
|
|
|
src/lxc/lxc-netstat
|
2009-03-24 13:56:37 +01:00
|
|
|
src/lxc/lxc-checkconfig
|
|
|
|
src/lxc/lxc-setcap
|
2008-11-28 15:36:51 +00:00
|
|
|
|
2008-08-06 14:32:29 +00:00
|
|
|
etc/Makefile
|
|
|
|
etc/lxc-macvlan.conf
|
|
|
|
etc/lxc-no-netns.conf
|
2008-09-03 13:41:02 +00:00
|
|
|
etc/lxc-empty-netns.conf
|
2008-08-06 14:32:29 +00:00
|
|
|
etc/lxc-phys.conf
|
|
|
|
etc/lxc-veth.conf
|
|
|
|
etc/lxc-complex-config
|
2008-11-28 15:36:51 +00:00
|
|
|
|
2008-08-06 14:32:29 +00:00
|
|
|
test/Makefile
|
|
|
|
])
|
|
|
|
AC_CONFIG_COMMANDS([default],[[]],[[]])
|
|
|
|
AC_OUTPUT
|
2008-10-24 20:14:57 +00:00
|
|
|
|
2008-11-18 14:03:57 +00:00
|
|
|
if test "x$DOCBOOK" = "xno"; then
|
2009-04-26 11:43:41 +02:00
|
|
|
AC_MSG_NOTICE([
|
2008-11-18 14:03:57 +00:00
|
|
|
|
|
|
|
Warning:
|
|
|
|
--------
|
|
|
|
The docbook tool is not installed, the man pages won't be generated.
|
2008-11-20 15:04:09 +00:00
|
|
|
If you want the man pages, install docbook and rerun 'configure'.
|
2008-11-18 14:03:57 +00:00
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2008-10-24 20:14:57 +00:00
|
|
|
if test "x$SETCAP" = "xno"; then
|
2009-04-26 11:43:41 +02:00
|
|
|
AC_MSG_NOTICE([
|
2008-10-24 20:14:57 +00:00
|
|
|
|
|
|
|
Warning:
|
|
|
|
--------
|
|
|
|
|
|
|
|
The libcap-2 is not installed. That means the tools to
|
2008-10-26 22:06:49 +00:00
|
|
|
set the privilege for the lxc commands are not available,
|
|
|
|
that's ok, but you will need to run these commands as root
|
2008-10-24 20:14:57 +00:00
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
else
|
|
|
|
|
2009-04-26 11:43:41 +02:00
|
|
|
AC_MSG_NOTICE([
|
2008-10-24 20:14:57 +00:00
|
|
|
|
|
|
|
Advice:
|
|
|
|
-------
|
|
|
|
|
2009-03-24 13:56:37 +01:00
|
|
|
If you which to have a non root user to use the lxc tools,
|
|
|
|
you can add the needed capabilities to the tools by invoking
|
|
|
|
the 'lxc-setcap' script. To remove the capabilities, use
|
|
|
|
'lxc-setcap -d'
|
2008-10-24 20:14:57 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
fi
|