configure.in revision b0e505c974ff7b018350f99f32199a52e18ed55b
45d862b9c655542aa44c02958011065f6994f512Trond Norbye# -*- Autoconf -*-
45d862b9c655542aa44c02958011065f6994f512Trond Norbye# Process this file with autoconf to produce a configure script.
45d862b9c655542aa44c02958011065f6994f512Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_INIT([lxc], [0.4.1])
45d862b9c655542aa44c02958011065f6994f512Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_CONFIG_SRCDIR([configure.in])
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_CONFIG_AUX_DIR([config])
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAM_CONFIG_HEADER([src/config.h])
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAM_INIT_AUTOMAKE([-Wno-portability])
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_CANONICAL_HOST
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_PROG_RANLIB
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAM_PROG_CC_C_O
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_GNU_SOURCE
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_PROG_LIBTOOL
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_CHECK_PROG(SETCAP, setcap, yes, no)
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_CHECK_PROG(DOCBOOK, docbook2man, yes, no)
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAM_CONDITIONAL(ENABLE_DOCBOOK, test x$DOCBOOK = xyes)
45d862b9c655542aa44c02958011065f6994f512Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found]),
45d862b9c655542aa44c02958011065f6994f512Trond Norbye[#include <linux/types.h>
45d862b9c655542aa44c02958011065f6994f512Trond Norbye#include <bits/sockaddr.h>
45d862b9c655542aa44c02958011065f6994f512Trond Norbye#include <linux/socket.h>])
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_PROG_GCC_TRADITIONAL
45d862b9c655542aa44c02958011065f6994f512Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond Norbyeif test "x$GCC" = "xyes"; then
45d862b9c655542aa44c02958011065f6994f512Trond Norbye CFLAGS="$CFLAGS -Wall"
45d862b9c655542aa44c02958011065f6994f512Trond Norbyefi
45d862b9c655542aa44c02958011065f6994f512Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeLXC_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1)
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeLXC_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeLXC_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
45d862b9c655542aa44c02958011065f6994f512Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_ARG_ENABLE(network_destroy, [ --disable-network-destroy disable network destruction at exit [default=no]],, enable_network_destroy=yes)
45d862b9c655542aa44c02958011065f6994f512Trond Norbyeif test "x$enable_network_destroy" = "xyes"; then
45d862b9c655542aa44c02958011065f6994f512Trond Norbye CFLAGS="$CFLAGS -DNETWORK_DESTROY"
45d862b9c655542aa44c02958011065f6994f512Trond Norbyefi
45d862b9c655542aa44c02958011065f6994f512Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_SUBST(LXC_MAJOR_VERSION)
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_SUBST(LXC_MINOR_VERSION)
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_SUBST(LXC_MICRO_VERSION)
45d862b9c655542aa44c02958011065f6994f512Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_CONFIG_FILES([
45d862b9c655542aa44c02958011065f6994f512Trond Norbye Makefile
45d862b9c655542aa44c02958011065f6994f512Trond Norbye lxc.spec
45d862b9c655542aa44c02958011065f6994f512Trond Norbye config/Makefile
45d862b9c655542aa44c02958011065f6994f512Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond Norbye doc/Makefile
45d862b9c655542aa44c02958011065f6994f512Trond Norbye doc/lxc-create.sgml
45d862b9c655542aa44c02958011065f6994f512Trond Norbye doc/lxc-destroy.sgml
45d862b9c655542aa44c02958011065f6994f512Trond Norbye doc/lxc-execute.sgml
45d862b9c655542aa44c02958011065f6994f512Trond Norbye doc/lxc-start.sgml
45d862b9c655542aa44c02958011065f6994f512Trond Norbye doc/lxc-stop.sgml
45d862b9c655542aa44c02958011065f6994f512Trond Norbye doc/lxc-freeze.sgml
45d862b9c655542aa44c02958011065f6994f512Trond Norbye doc/lxc-unfreeze.sgml
45d862b9c655542aa44c02958011065f6994f512Trond Norbye doc/lxc-monitor.sgml
45d862b9c655542aa44c02958011065f6994f512Trond Norbye doc/lxc-wait.sgml
45d862b9c655542aa44c02958011065f6994f512Trond Norbye doc/lxc-ls.sgml
45d862b9c655542aa44c02958011065f6994f512Trond Norbye doc/lxc-ps.sgml
45d862b9c655542aa44c02958011065f6994f512Trond Norbye doc/lxc-cgroup.sgml
45d862b9c655542aa44c02958011065f6994f512Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond Norbye src/Makefile
45d862b9c655542aa44c02958011065f6994f512Trond Norbye src/lxc/Makefile
45d862b9c655542aa44c02958011065f6994f512Trond Norbye src/lxc/lxc-ps
45d862b9c655542aa44c02958011065f6994f512Trond Norbye src/lxc/lxc-ls
45d862b9c655542aa44c02958011065f6994f512Trond Norbye src/lxc/lxc-checkconfig
45d862b9c655542aa44c02958011065f6994f512Trond Norbye etc/Makefile
45d862b9c655542aa44c02958011065f6994f512Trond Norbye etc/lxc-macvlan.conf
45d862b9c655542aa44c02958011065f6994f512Trond Norbye etc/lxc-no-netns.conf
45d862b9c655542aa44c02958011065f6994f512Trond Norbye etc/lxc-empty-netns.conf
45d862b9c655542aa44c02958011065f6994f512Trond Norbye etc/lxc-phys.conf
45d862b9c655542aa44c02958011065f6994f512Trond Norbye etc/lxc-veth.conf
45d862b9c655542aa44c02958011065f6994f512Trond Norbye etc/lxc-complex-config
45d862b9c655542aa44c02958011065f6994f512Trond Norbye test/Makefile
45d862b9c655542aa44c02958011065f6994f512Trond Norbye])
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_CONFIG_COMMANDS([default],[[]],[[]])
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeAC_OUTPUT
45d862b9c655542aa44c02958011065f6994f512Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond Norbyeif test "x$DOCBOOK" = "xno"; then
45d862b9c655542aa44c02958011065f6994f512Trond Norbye AC_MSG_NOTICE([
45d862b9c655542aa44c02958011065f6994f512Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeWarning:
45d862b9c655542aa44c02958011065f6994f512Trond Norbye--------
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeThe docbook tool is not installed, the man pages won't be generated.
45d862b9c655542aa44c02958011065f6994f512Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond Norbye])
45d862b9c655542aa44c02958011065f6994f512Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond Norbyefi
45d862b9c655542aa44c02958011065f6994f512Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond Norbyeif test "x$SETCAP" = "xno"; then
45d862b9c655542aa44c02958011065f6994f512Trond Norbye AC_MSG_NOTICE([
45d862b9c655542aa44c02958011065f6994f512Trond Norbye
45d862b9c655542aa44c02958011065f6994f512Trond NorbyeWarning:
45d862b9c655542aa44c02958011065f6994f512Trond Norbye--------
The libcap-2 is not installed. That 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
])
else
AC_MSG_NOTICE([
Advice:
-------
When installing the tools, it is adviced to install as
root, so the privilege for the commands will be set and
they will be usable by non-root user
make && sudo make install
])
fi