configure.ac revision f8744a950b963312362d245ece0561306dabf2dd
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa# -*- Autoconf -*-
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa# Process this file with autoconf to produce a configure script.
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksam4_define([lxc_version_major], 1)
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksam4_define([lxc_version_minor], 0)
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksam4_define([lxc_version_micro], 0)
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksam4_define([lxc_version_beta], [rc2])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksam4_define([lxc_version_base], [lxc_version_major.lxc_version_minor.lxc_version_micro])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksam4_define([lxc_version],
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa [ifelse(lxc_version_beta, [], [lxc_version_base], [lxc_version_base.lxc_version_beta])])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAC_INIT([lxc], [lxc_version])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa# We need pkg-config
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaPKG_PROG_PKG_CONFIG
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAC_SUBST(LXC_VERSION_BASE, lxc_version_base)
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAC_SUBST(LXC_VERSION_BETA, lxc_version_beta)
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAC_SUBST([LXC_VERSION_MAJOR], [lxc_version_major])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAC_SUBST([LXC_VERSION_MINOR], [lxc_version_minor])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAC_SUBST([LXC_VERSION_MICRO], [lxc_version_micro])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAC_SUBST([LXC_VERSION], [lxc_version])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAC_CONFIG_SRCDIR([configure.ac])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAC_CONFIG_AUX_DIR([config])
8838c545565ed474cf42f886b1296c6cdfc2276dEugen KuksaAC_CONFIG_HEADERS([src/config.h])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability subdir-objects])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAC_CANONICAL_HOST
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAM_PROG_CC_C_O
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAC_GNU_SOURCE
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa# Detect the distribution. This is used for the default configuration and
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa# for some distro-specific build options.
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAC_MSG_CHECKING([host distribution])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAC_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.]))
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksaif type lsb_release >/dev/null 2>&1 && test "z$with_distro" = "z"; then
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa with_distro=`lsb_release -is`
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksaif test "z$with_distro" = "z"; then
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa AC_CHECK_FILE(/etc/oracle-release,with_distro="oracle")
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa AC_CHECK_FILE(/etc/centos-release,with_distro="centos")
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa AC_CHECK_FILE(/etc/fedora-release,with_distro="fedora")
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa AC_CHECK_FILE(/etc/arch-release,with_distro="arch")
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa AC_CHECK_FILE(/etc/frugalware-release,with_distro="frugalware")
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa AC_CHECK_FILE(/etc/mandrakelinux-release, with_distro="openmandriva")
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa AC_CHECK_FILE(/etc/mandriva-release,with_distro="openmandriva")
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus")
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksawith_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]'`
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksaif test "z$with_distro" = "z"; then
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa with_distro="unknown"
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksacase $with_distro in
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa redhat|centos|fedora|oracle|oracleserver)
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAC_MSG_RESULT([$with_distro])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAM_CONDITIONAL([HAVE_DEBIAN], [test x"$with_distro" = "xdebian" -o x"$with_distro" = "xubuntu"])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAM_CONDITIONAL([DISTRO_UBUNTU], [test "x$with_distro" = "xubuntu"])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa# Check for init system type
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAC_MSG_CHECKING([for init system type])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen KuksaAC_ARG_WITH([init-script],
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa [AC_HELP_STRING([--with-init-script@<:@=TYPE@<:@,TYPE,...@:>@@:>@],
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa [Type(s) of init script to install: sysvinit, systemd, upstart,
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa distro @<:@default=distro@:>@])],[],[with_init_script=distro])
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksacase "$with_init_script" in
9176d09fad7744e257dd3292bd4d9b066b670b87Eugen Kuksa case $with_distro in
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])
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).