2008-08-06 14:32:29 +00:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
2009-07-24 15:25:43 +02:00
|
|
|
AC_INIT([lxc], [0.6.3])
|
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
|
2009-07-02 15:42:18 +02:00
|
|
|
AC_CHECK_PROG(SETCAP, setcap, yes, no, $PATH$PATH_SEPARATOR/sbin)
|
2008-11-18 14:03:57 +00:00
|
|
|
AC_CHECK_PROG(DOCBOOK, docbook2man, yes, no)
|
|
|
|
AM_CONDITIONAL(ENABLE_DOCBOOK, test x$DOCBOOK = xyes)
|
2009-06-10 18:21:48 +02:00
|
|
|
AS_AC_EXPAND(PREFIX, $prefix)
|
|
|
|
AS_AC_EXPAND(LIBDIR, $libdir)
|
2008-12-01 11:50:43 +00:00
|
|
|
AS_AC_EXPAND(BINDIR, $bindir)
|
2009-06-10 18:21:48 +02:00
|
|
|
AS_AC_EXPAND(INCLUDEDIR, $includedir)
|
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)
|
2009-06-10 18:21:48 +02:00
|
|
|
AS_AC_EXPAND(DATADIR, $datadir)
|
2008-12-01 11:50:43 +00:00
|
|
|
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
|
|
|
|
2009-07-26 17:44:12 +02:00
|
|
|
AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
|
|
|
|
[],
|
|
|
|
AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
|
|
|
|
[#include <sys/socket.h>
|
|
|
|
])
|
2008-12-09 17:49:21 +00:00
|
|
|
|
|
|
|
AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
|
2009-06-12 16:02:14 +02:00
|
|
|
[#include <sys/types.h>
|
|
|
|
#include <sys/capability.h>])
|
2008-12-09 17:49:21 +00:00
|
|
|
|
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)
|
|
|
|
|
|
|
|
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
|
2009-06-10 18:21:48 +02:00
|
|
|
lxc.pc
|
2008-08-06 14:32:29 +00:00
|
|
|
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:30 +02:00
|
|
|
doc/common_options.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
|
2009-06-10 18:49:16 +02:00
|
|
|
src/lxc/lxc-version
|
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
|
|
|
|
])
|
|
|
|
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:
|
|
|
|
--------
|
2009-07-26 17:44:11 +02:00
|
|
|
The docbook tool is not installed, the man pages won't be regenerated.
|
|
|
|
If you need to update the manpages, 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:
|
|
|
|
--------
|
|
|
|
|
2009-07-02 15:42:18 +02:00
|
|
|
The setcap binary was not found. This means the tools to set the
|
|
|
|
privilege for the lxc commands are not available, that's ok, but you
|
|
|
|
will need to run these commands as root or install libcap-2.
|
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-07-02 15:42:18 +02:00
|
|
|
If you wish to have a non root user to use the lxc tools,
|
2009-03-24 13:56:37 +01:00
|
|
|
you can add the needed capabilities to the tools by invoking
|
|
|
|
the 'lxc-setcap' script. To remove the capabilities, use
|
2009-07-02 15:42:18 +02:00
|
|
|
'lxc-setcap -d'.
|
2008-10-24 20:14:57 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
fi
|