configure.ac revision 213b0fe063ffa03d4ab1307a0dbe234e98693e0b
fc71e94957d0c2959a609450a2f303640d681858Sascha Wilde# -*- Autoconf -*-
fc71e94957d0c2959a609450a2f303640d681858Sascha Wilde# Process this file with autoconf to produce a configure script.
bdd36cfdba3ff66d25570a9ff568d69e1eb543cfTimo Sirainenm4_define([lxc_version_major], 1)
fc464e5b2b2ab4d415a5d5b90ce4475d34620a75Timo Sirainenm4_define([lxc_version_minor], 1)
c5a6a6565be93224fc26522eda855b0990f256e8Timo Sirainenm4_define([lxc_version_micro], 0)
c5a6a6565be93224fc26522eda855b0990f256e8Timo Sirainenm4_define([lxc_version_beta], [alpha1])
c5a6a6565be93224fc26522eda855b0990f256e8Timo Sirainenm4_define([lxc_version_base], [lxc_version_major.lxc_version_minor.lxc_version_micro])
c5a6a6565be93224fc26522eda855b0990f256e8Timo Sirainenm4_define([lxc_version],
c5a6a6565be93224fc26522eda855b0990f256e8Timo Sirainen [ifelse(lxc_version_beta, [], [lxc_version_base], [lxc_version_base.lxc_version_beta])])
fc464e5b2b2ab4d415a5d5b90ce4475d34620a75Timo SirainenAC_INIT([lxc], [lxc_version])
fc464e5b2b2ab4d415a5d5b90ce4475d34620a75Timo Sirainen# We need pkg-config
fc464e5b2b2ab4d415a5d5b90ce4475d34620a75Timo SirainenPKG_PROG_PKG_CONFIG
fc464e5b2b2ab4d415a5d5b90ce4475d34620a75Timo SirainenAC_SUBST(LXC_VERSION_BASE, lxc_version_base)
fc71e94957d0c2959a609450a2f303640d681858Sascha WildeAC_SUBST(LXC_VERSION_BETA, lxc_version_beta)
fc71e94957d0c2959a609450a2f303640d681858Sascha WildeAC_SUBST([LXC_VERSION_MAJOR], [lxc_version_major])
9f10cc61ec303351b43e54155c86699ef53cb8beTimo SirainenAC_SUBST([LXC_VERSION_MINOR], [lxc_version_minor])
aba994a4e79a020b4748e0ceffc194e5a18e1d1aTimo SirainenAC_SUBST([LXC_VERSION_MICRO], [lxc_version_micro])
e438c85a6b0f77889e25913bbbba808d6078282dStephan BoschAC_SUBST([LXC_VERSION], [lxc_version])
fc71e94957d0c2959a609450a2f303640d681858Sascha WildeAC_CONFIG_SRCDIR([configure.ac])
64bfe7b4a42512971db154937905dfa2bdb9cf2cTimo SirainenAC_CONFIG_AUX_DIR([config])
c5a6a6565be93224fc26522eda855b0990f256e8Timo SirainenAC_CONFIG_HEADERS([src/config.h])
64bfe7b4a42512971db154937905dfa2bdb9cf2cTimo SirainenAM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability subdir-objects])
fc71e94957d0c2959a609450a2f303640d681858Sascha WildeAC_CANONICAL_HOST
3b22894b8805b186c73d8b754001e8d7e944be85Timo SirainenAM_PROG_CC_C_O
64bfe7b4a42512971db154937905dfa2bdb9cf2cTimo Sirainen# Detect the distribution. This is used for the default configuration and
fc464e5b2b2ab4d415a5d5b90ce4475d34620a75Timo Sirainen# for some distro-specific build options.
9f10cc61ec303351b43e54155c86699ef53cb8beTimo SirainenAC_MSG_CHECKING([host distribution])
9f10cc61ec303351b43e54155c86699ef53cb8beTimo 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.]))
fc464e5b2b2ab4d415a5d5b90ce4475d34620a75Timo Sirainenif type lsb_release >/dev/null 2>&1 && test "z$with_distro" = "z"; then
fc464e5b2b2ab4d415a5d5b90ce4475d34620a75Timo Sirainen with_distro=`lsb_release -is`
fc464e5b2b2ab4d415a5d5b90ce4475d34620a75Timo Sirainenif test "z$with_distro" = "z"; then
a43145989f87ec68754e21234e7b6d892c4a4421Timo Sirainen AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
a43145989f87ec68754e21234e7b6d892c4a4421Timo Sirainen AC_CHECK_FILE(/etc/oracle-release,with_distro="oracle")
a43145989f87ec68754e21234e7b6d892c4a4421Timo Sirainen AC_CHECK_FILE(/etc/centos-release,with_distro="centos")
a43145989f87ec68754e21234e7b6d892c4a4421Timo Sirainen AC_CHECK_FILE(/etc/fedora-release,with_distro="fedora")
fc71e94957d0c2959a609450a2f303640d681858Sascha Wilde AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
9f10cc61ec303351b43e54155c86699ef53cb8beTimo Sirainen AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
9f10cc61ec303351b43e54155c86699ef53cb8beTimo Sirainen AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
9f10cc61ec303351b43e54155c86699ef53cb8beTimo Sirainen AC_CHECK_FILE(/etc/arch-release,with_distro="arch")
9f10cc61ec303351b43e54155c86699ef53cb8beTimo Sirainen AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
665e9d14c005b65d95eae0baaa471c51e5caca73Timo Sirainen AC_CHECK_FILE(/etc/frugalware-release,with_distro="frugalware")
665e9d14c005b65d95eae0baaa471c51e5caca73Timo Sirainen AC_CHECK_FILE(/etc/mandrakelinux-release, with_distro="openmandriva")
665e9d14c005b65d95eae0baaa471c51e5caca73Timo Sirainen AC_CHECK_FILE(/etc/mandriva-release,with_distro="openmandriva")
4b1359bde7d32667197548652a4b4f540062e2acTimo Sirainen AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus")
665e9d14c005b65d95eae0baaa471c51e5caca73Timo Sirainenwith_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]'`
4b1359bde7d32667197548652a4b4f540062e2acTimo Sirainenif test "z$with_distro" = "z"; then
69d60dcff2614c4bfc8ad59e8fdc09e39c9dd0dcTimo Sirainen with_distro="unknown"
4b1359bde7d32667197548652a4b4f540062e2acTimo Sirainencase $with_distro in
distroconf=default.conf.libvirt
distroconf=default.conf.unknown
with_systemdsystemunitdir=/lib/systemd/system
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],[true],[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_SEARCH_LIBS([cgmanager_get_pid_cgroup_abs_sync], [cgmanager], [have_abs_cgroups=yes], [have_abs_cgroups=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]])],
AC_SUBST([LUA_LIBDIR], [$libdir/lua/$LUA_VERSION])
AC_SUBST([LUA_SHAREDIR], [$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).