configure.ac revision 34c66a6980bebf1ca9b7da87e627fc507a6c139a
294N/A# -*- Autoconf -*-
294N/A# Process this file with autoconf to produce a configure script.
294N/A
294N/AAC_INIT([lxc], [0.6.2])
294N/A
294N/AAC_CONFIG_SRCDIR([configure.ac])
294N/AAC_CONFIG_AUX_DIR([config])
294N/AAM_CONFIG_HEADER([src/config.h])
294N/AAM_INIT_AUTOMAKE([-Wno-portability])
294N/AAC_CANONICAL_HOST
294N/AAM_PROG_CC_C_O
294N/AAC_GNU_SOURCE
294N/AAC_PROG_LIBTOOL
294N/AAC_CHECK_PROG(SETCAP, setcap, yes, no)
294N/AAC_CHECK_PROG(DOCBOOK, docbook2man, yes, no)
294N/AAM_CONDITIONAL(ENABLE_DOCBOOK, test x$DOCBOOK = xyes)
294N/AAS_AC_EXPAND(BINDIR, $bindir)
294N/AAS_AC_EXPAND(LIBEXECDIR, $libexecdir)
294N/AAS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
294N/AAS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
294N/AAS_AC_EXPAND(LXCPATH, "${localstatedir}/lib/lxc")
294N/AAS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
294N/A
294N/AAC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found]),
294N/A[#include <linux/types.h>
294N/A#include <bits/sockaddr.h>
294N/A#include <linux/socket.h>])
294N/A
294N/AAC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
294N/A[#include <sys/capability.h>])
294N/A
294N/A# Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
294N/AAC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
294N/A
294N/AAC_CHECK_HEADERS([sys/signalfd.h])
294N/A
294N/AAC_PROG_GCC_TRADITIONAL
294N/A
294N/Aif test "x$GCC" = "xyes"; then
294N/A CFLAGS="$CFLAGS -Wall"
294N/Afi
294N/A
294N/ALXC_MAJOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f1)
294N/ALXC_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
294N/ALXC_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
294N/A
294N/AAC_ARG_WITH([kernel-release],
294N/A [AC_HELP_STRING([--with-kernel-release=RELEASE],
294N/A [specify the "uname -r"-value to build for])],
294N/A [KERNEL_RELEASE="${withval}"],
294N/A [KERNEL_RELEASE=`uname -r`])
294N/A
294N/AAC_ARG_ENABLE(test, [ --enable-test compile test program [default=no]],, enable_test=no)
294N/AAM_CONDITIONAL(ENABLE_TEST, test x$enable_test = xyes)
294N/A
294N/AAC_SUBST(LXC_MAJOR_VERSION)
294N/AAC_SUBST(LXC_MINOR_VERSION)
294N/AAC_SUBST(LXC_MICRO_VERSION)
294N/A
294N/AAC_CONFIG_FILES([
294N/A Makefile
294N/A lxc.spec
294N/A config/Makefile
294N/A
294N/A doc/Makefile
294N/A doc/lxc-create.sgml
294N/A doc/lxc-destroy.sgml
294N/A doc/lxc-execute.sgml
294N/A doc/lxc-start.sgml
294N/A doc/lxc-stop.sgml
294N/A doc/lxc-console.sgml
294N/A doc/lxc-freeze.sgml
294N/A doc/lxc-unfreeze.sgml
294N/A doc/lxc-monitor.sgml
294N/A doc/lxc-wait.sgml
294N/A doc/lxc-ls.sgml
294N/A doc/lxc-ps.sgml
294N/A doc/lxc-cgroup.sgml
294N/A doc/lxc.conf.sgml
294N/A doc/lxc.sgml
294N/A
294N/A scripts/Makefile
294N/A scripts/lxc-debian
294N/A scripts/lxc-fedora
294N/A scripts/lxc-sshd
294N/A
294N/A src/Makefile
294N/A src/lxc/Makefile
294N/A src/lxc/lxc-ps
294N/A src/lxc/lxc-ls
294N/A src/lxc/lxc-netstat
294N/A src/lxc/lxc-checkconfig
294N/A src/lxc/lxc-setcap
294N/A
294N/A etc/Makefile
294N/A etc/lxc-macvlan.conf
294N/A etc/lxc-no-netns.conf
294N/A etc/lxc-empty-netns.conf
294N/A etc/lxc-phys.conf
294N/A etc/lxc-veth.conf
294N/A etc/lxc-complex-config
294N/A
294N/A test/Makefile
294N/A])
294N/AAC_CONFIG_COMMANDS([default],[[]],[[]])
294N/AAC_OUTPUT
294N/A
294N/Aif test "x$DOCBOOK" = "xno"; then
294N/A AC_MSG_NOTICE([
294N/A
294N/AWarning:
294N/A--------
294N/AThe docbook tool is not installed, the man pages won't be generated.
294N/AIf you want the man pages, install docbook and rerun 'configure'.
294N/A
294N/A])
294N/A
294N/Afi
294N/A
294N/Aif test "x$SETCAP" = "xno"; then
294N/A AC_MSG_NOTICE([
294N/A
294N/AWarning:
294N/A--------
294N/A
294N/AThe libcap-2 is not installed. That means the tools to
294N/Aset the privilege for the lxc commands are not available,
294N/Athat's ok, but you will need to run these commands as root
294N/A
294N/A])
294N/A
294N/Aelse
294N/A
294N/A AC_MSG_NOTICE([
294N/A
294N/AAdvice:
294N/A-------
294N/A
294N/AIf you which to have a non root user to use the lxc tools,
294N/Ayou can add the needed capabilities to the tools by invoking
294N/Athe 'lxc-setcap' script. To remove the capabilities, use
294N/A'lxc-setcap -d'
294N/A])
294N/A
294N/Afi
294N/A