configure.ac revision 223b1e0c874181883d0f75f9d7e7f80a67f85faf
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3Timo Sirainen# -*- Autoconf -*-
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen# Process this file with autoconf to produce a configure script.
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainenm4_define([lxc_version_major], 1)
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainenm4_define([lxc_version_minor], 0)
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainenm4_define([lxc_version_micro], 0)
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainenm4_define([lxc_version_beta], [])
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainenm4_define([lxc_version_base], [lxc_version_major.lxc_version_minor.lxc_version_micro])
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainenm4_define([lxc_version],
faec0abfd648c647030027e86de2ce8911df683bTimo Sirainen [ifelse(lxc_version_beta, [], [lxc_version_base], [lxc_version_base.lxc_version_beta])])
2ac5f36aa7c2e7a07ba8815d43a6d7483f62e74cTimo SirainenAC_INIT([lxc], [lxc_version])
faec0abfd648c647030027e86de2ce8911df683bTimo Sirainen# We need pkg-config
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo SirainenPKG_PROG_PKG_CONFIG
faec0abfd648c647030027e86de2ce8911df683bTimo SirainenAC_SUBST(LXC_VERSION_BASE, lxc_version_base)
faec0abfd648c647030027e86de2ce8911df683bTimo SirainenAC_SUBST(LXC_VERSION_BETA, lxc_version_beta)
faec0abfd648c647030027e86de2ce8911df683bTimo SirainenAC_SUBST([LXC_VERSION_MAJOR], [lxc_version_major])
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo SirainenAC_SUBST([LXC_VERSION_MINOR], [lxc_version_minor])
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo SirainenAC_SUBST([LXC_VERSION_MICRO], [lxc_version_micro])
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo SirainenAC_SUBST([LXC_VERSION], [lxc_version])
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo SirainenAC_CONFIG_SRCDIR([configure.ac])
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo SirainenAC_CONFIG_AUX_DIR([config])
faec0abfd648c647030027e86de2ce8911df683bTimo SirainenAC_CONFIG_HEADERS([src/config.h])
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo SirainenAM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability subdir-objects])
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo SirainenAC_CANONICAL_HOST
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo SirainenAM_PROG_CC_C_O
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen# Detect the distribution. This is used for the default configuration and
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen# for some distro-specific build options.
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo SirainenAC_MSG_CHECKING([host distribution])
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo SirainenAC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, oracle, centos, fedora, suse, gentoo, debian, arch, slackware, paldo, openmandriva or pardus.]))
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainenif type lsb_release >/dev/null 2>&1 && test "z$with_distro" = "z"; then
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen with_distro=`lsb_release -is`
a10ed8c47534b4c6b6bf2711ccfe577e720a47b4Timo Sirainenif test "z$with_distro" = "z"; then
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen AC_CHECK_FILE(/etc/oracle-release,with_distro="oracle")
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen AC_CHECK_FILE(/etc/centos-release,with_distro="centos")
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen AC_CHECK_FILE(/etc/fedora-release,with_distro="fedora")
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen AC_CHECK_FILE(/etc/arch-release,with_distro="arch")
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen AC_CHECK_FILE(/etc/frugalware-release,with_distro="frugalware")
d6b3cfd855c0eebed68be50d3111de1b5a6afeb0Timo Sirainen AC_CHECK_FILE(/etc/mandrakelinux-release, with_distro="openmandriva")
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen AC_CHECK_FILE(/etc/mandriva-release,with_distro="openmandriva")
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus")
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainenwith_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]'`
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainenif test "z$with_distro" = "z"; then
83942ac160cdfb922c3a2f29ddfae2a13ebf8b5dTimo Sirainen with_distro="unknown"
distroconf=default.conf.ubuntu
distroconf=default.conf.libvirt
distroconf=default.conf.unknown
if "$name" --help >/dev/null 2>&1; then
docdtd="\"-//OASIS//DTD DocBook XML\" \"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\""
[AC_CHECK_HEADER([sys/apparmor.h],[],[AC_MSG_ERROR([You must install the AppArmor development package in order to compile lxc])])
AC_CHECK_LIB([apparmor], [aa_change_profile],[],[AC_MSG_ERROR([You must install the AppArmor development package in order to compile lxc])])
[AC_CHECK_HEADER([selinux/selinux.h],[],[AC_MSG_ERROR([You must install the SELinux development package in order to compile lxc])])
AC_CHECK_LIB([selinux], [setexeccon_raw],[],[AC_MSG_ERROR([You must install the SELinux development package in order to compile lxc])])
AC_CHECK_HEADER([seccomp.h],[],[AC_MSG_ERROR([You must install the seccomp development package in order to compile lxc])])
AC_CHECK_LIB([seccomp], [seccomp_init],[],[AC_MSG_ERROR([You must install the seccomp development package in order to compile lxc])])
AC_CHECK_LIB([cgmanager],[cgmanager_create],[enable_cgmanager=yes],[enable_cgmanager=no],[-lnih -lnih-dbus -ldbus-1])
AC_CHECK_TYPES([scmp_filter_ctx], [], [], [[#include <seccomp.h>]])
AC_CHECK_DECLS([seccomp_syscall_resolve_name_arch], [], [], [[#include <seccomp.h>]])
[AC_HELP_STRING([--enable-mutex-debugging], [Makes mutexes to report error and provide stack trace [default=no]])],
[LUA_INSTALL_CMOD=$libdir/lua/$LUA_VERSION])
[LUA_INSTALL_LMOD=$datadir/lua/$LUA_VERSION])
[AC_HELP_STRING([--enable-tests], [build test/example binaries [default=no]])],
)], [], [with_config_path=['${localstatedir}/lib/lxc']])
)], [], [with_global_conf=['${sysconfdir}/lxc/lxc.conf']])
)], [], [with_usernic_conf=['${sysconfdir}/lxc/lxc-usernet']])
)], [], [with_usernic_db=['${with_runtime_path}/lxc/nics']])
)], [], [with_rootfs_path=['${libdir}/lxc/rootfs']])
default_log_path="${localstatedir}/log/lxc"
AS_AC_EXPAND(LXC_DEFAULT_CONFIG, "$sysconfdir/lxc/default.conf")
AS_AC_EXPAND(LXCTEMPLATEDIR, "$datadir/lxc/templates")
AS_AC_EXPAND(LXCTEMPLATECONFIG, "$datadir/lxc/config")
AS_AC_EXPAND(LXCHOOKDIR, "$datadir/lxc/hooks")
[#include <sys/socket.h>])
AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
AC_CHECK_HEADERS([sys/signalfd.h pty.h ifaddrs.h sys/capability.h sys/personality.h utmpx.h sys/timerfd.h])
You are compiling LXC for bionic target which lacks certain threading related functionality used by LXC API (like pthread_atfork).