configure.ac revision 89d556d83a2eb9c6bbe424a7bb0556f59bb137dc
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat# -*- Autoconf -*-
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat# Process this file with autoconf to produce a configure script.
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. WarfieldAC_INIT([lxc], [0.9.0.rc1])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAC_CONFIG_SRCDIR([configure.ac])
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAC_CONFIG_AUX_DIR([config])
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAC_CONFIG_HEADERS([src/config.h])
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability])
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAC_CANONICAL_HOST
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAM_PROG_CC_C_O
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAC_GNU_SOURCE
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield
0ce7569856cc7a366f58688f6b6a71610167fc76Johannes Kastl# Detect the distribution. This is used for the default configuration and
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat# for some distro-specific build options.
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAC_MSG_CHECKING([host distribution])
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, oracle, fedora, suse, gentoo, debian, arch, slackware, paldo, mandriva or pardus.]))
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozatif test "z$with_distro" = "z"; then
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat with_distro=`lsb_release -is`
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozatfi
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozatif test "z$with_distro" = "z"; then
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber AC_CHECK_FILE(/etc/oracle-release,with_distro="oracle")
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat AC_CHECK_FILE(/etc/fedora-release,with_distro="fedora")
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane Graber AC_CHECK_FILE(/etc/arch-release,with_distro="arch")
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
8ec981fc8b0105da5f071e40811e0c2472a6c3c9Stéphane Graber AC_CHECK_FILE(/etc/frugalware-release,with_distro="frugalware")
c63c04fcaf1c3a78c70500eae253d72fa9c8358aTAMUKI Shoichi AC_CHECK_FILE(/etc/mandrakelinux-release, with_distro="mandriva")
96283b546081e7ff709968378fca25cb44f1ab6cStéphane Graber AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva")
96283b546081e7ff709968378fca25cb44f1ab6cStéphane Graber AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus")
8ec981fc8b0105da5f071e40811e0c2472a6c3c9Stéphane Graberfi
8ec981fc8b0105da5f071e40811e0c2472a6c3c9Stéphane Graberwith_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]'`
8ec981fc8b0105da5f071e40811e0c2472a6c3c9Stéphane Graber
8ec981fc8b0105da5f071e40811e0c2472a6c3c9Stéphane Graberif test "z$with_distro" = "z"; then
8ec981fc8b0105da5f071e40811e0c2472a6c3c9Stéphane Graber with_distro="unknown"
8ec981fc8b0105da5f071e40811e0c2472a6c3c9Stéphane Graberfi
207bf0e475f1dc6e9a2dac2cee3a209b56427855Stéphane Grabercase $with_distro in
207bf0e475f1dc6e9a2dac2cee3a209b56427855Stéphane Graber ubuntu)
207bf0e475f1dc6e9a2dac2cee3a209b56427855Stéphane Graber defaultconf=default.conf.ubuntu
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat ;;
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat redhat|fedora|oracle|oracleserver)
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat defaultconf=default.conf.libvirt
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat ;;
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat *)
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield echo -n "Linux distribution network config unknown, defaulting to lxc.network.type = empty"
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat defaultconf=default.conf.unknown
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat ;;
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfieldesac
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAC_MSG_RESULT([$with_distro])
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAM_CONDITIONAL([HAVE_DEBIAN], [test x"$with_distro" = "xdebian" -o x"$with_distro" = "xubuntu"])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat# Allow disabling rpath
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAC_ARG_ENABLE([rpath],
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat [AC_HELP_STRING([--disable-rpath], [do not set rpath in executables])],
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat [], [enable_rpath=yes])
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAM_CONDITIONAL([ENABLE_RPATH], [test "x$enable_rpath" = "xyes"])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
ba4c42597399c72fbb0b8f99e6ded79f738a6ac3Frederic Crozat# Documentation (manpages)
ba4c42597399c72fbb0b8f99e6ded79f738a6ac3Frederic CrozatAC_ARG_ENABLE([doc],
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat [AC_HELP_STRING([--enable-doc], [make mans (require docbook2x-man installed) [default=auto]])],
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat [], [enable_doc=auto])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozatif test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat db2xman=""
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat AC_MSG_CHECKING(for docbook2x-man)
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat for name in docbook2x-man db2x_docbook2man; do
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat if "$name" --help >/dev/null 2>&1; then
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat db2xman="$name"
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat break;
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat fi
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat done
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat if test -n "${db2xman}"; then
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat AC_MSG_RESULT([${db2xman}])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat else
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat AC_MSG_RESULT([no])
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat if test "x$enable_doc" = "xyes"; then
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat AC_MSG_ERROR([docbook2x-man required by man request, but not found])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat fi
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat fi
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat AC_SUBST(db2xman)
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozatfi
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAM_CONDITIONAL([ENABLE_DOCBOOK], [test "x$db2xman" != "x"])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat# Apparmor
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAC_ARG_ENABLE([apparmor],
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat [AC_HELP_STRING([--enable-apparmor], [enable apparmor])],
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat [], [enable_apparmor=check])
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozatif test "$enable_apparmor" = "check" ; then
36368228d286cd5c1492ae7aab92b4d78dbfb616Serge Hallyn AC_CHECK_LIB([apparmor],[aa_change_profile],[enable_apparmor=yes], [enable_apparmor=no])
36368228d286cd5c1492ae7aab92b4d78dbfb616Serge Hallynfi
36368228d286cd5c1492ae7aab92b4d78dbfb616Serge HallynAM_CONDITIONAL([ENABLE_APPARMOR], [test "x$enable_apparmor" = "xyes"])
36368228d286cd5c1492ae7aab92b4d78dbfb616Serge Hallyn
36368228d286cd5c1492ae7aab92b4d78dbfb616Serge HallynAM_COND_IF([ENABLE_APPARMOR],
36368228d286cd5c1492ae7aab92b4d78dbfb616Serge Hallyn [AC_CHECK_HEADER([sys/apparmor.h],[],[AC_MSG_ERROR([You must install the AppArmor development package in order to compile lxc])])
36368228d286cd5c1492ae7aab92b4d78dbfb616Serge Hallyn AC_CHECK_LIB([apparmor], [aa_change_profile],[],[AC_MSG_ERROR([You must install the AppArmor development package in order to compile lxc])])
36368228d286cd5c1492ae7aab92b4d78dbfb616Serge Hallyn AC_SUBST([APPARMOR_LIBS], [-lapparmor])])
98f5f7e2c54fc003f81b2164adf3c7bd8a104556Cedric Bosdonnat
98f5f7e2c54fc003f81b2164adf3c7bd8a104556Cedric Bosdonnat# Seccomp syscall filter
98f5f7e2c54fc003f81b2164adf3c7bd8a104556Cedric BosdonnatAC_ARG_ENABLE([seccomp],
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat [AC_HELP_STRING([--enable-seccomp], [enable seccomp])],
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat [], [enable_seccomp=check])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozatif test "$enable_seccomp" = "check" ; then
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat AC_CHECK_LIB([seccomp],[seccomp_init],[enable_seccomp=yes],[enable_seccomp=no])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozatfi
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAM_CONDITIONAL([ENABLE_SECCOMP], [test "x$enable_seccomp" = "xyes"])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAM_COND_IF([ENABLE_SECCOMP],
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat [AC_CHECK_HEADER([seccomp.h],[],[AC_MSG_ERROR([You must install the seccomp development package in order to compile lxc])])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat AC_CHECK_LIB([seccomp], [seccomp_init],[],[AC_MSG_ERROR([You must install the seccomp development package in order to compile lxc])])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat AC_SUBST([SECCOMP_LIBS], [-lseccomp])])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat# HAVE_SCMP_FILTER_CTX=1 will tell us we have libseccomp api >= 1.0.0
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic CrozatAC_CHECK_TYPES([scmp_filter_ctx], [], [], [#include <seccomp.h>])
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat# Configuration examples
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic CrozatAC_ARG_ENABLE([examples],
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat [AC_HELP_STRING([--disable-examples], [do not install configuration examples])],
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat [], [enable_examples=yes])
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat# Python3 module and scripts
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAC_ARG_ENABLE([python],
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber [AC_HELP_STRING([--enable-python], [enable python binding])],
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber [enable_python=yes], [enable_python=no])
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAM_CONDITIONAL([ENABLE_PYTHON], [test "x$enable_python" = "xyes"])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAM_COND_IF([ENABLE_PYTHON],
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat [AM_PATH_PYTHON([3.2], [], [AC_MSG_ERROR([You must install python3])])
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat PKG_CHECK_MODULES([PYTHONDEV], [python3 >= 3.2],[],[AC_MSG_ERROR([You must install python3-dev])])
f4936bf19c56a688eec182e1916c8b660e3a0058Jiri Slaby AC_DEFINE_UNQUOTED([ENABLE_PYTHON], 1, [Python3 is available])])
f4936bf19c56a688eec182e1916c8b660e3a0058Jiri Slaby
f4936bf19c56a688eec182e1916c8b660e3a0058Jiri Slaby# Lua module and scripts
36368228d286cd5c1492ae7aab92b4d78dbfb616Serge Hallynif test x"$with_distro" = "xdebian" -o x"$with_distro" = "xubuntu" ; then
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat LUAPKGCONFIG=lua5.1
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozatelse
cc33e055dd047af7b4cc8a226bb54b3b9c450152Jiri Slaby LUAPKGCONFIG=lua
36368228d286cd5c1492ae7aab92b4d78dbfb616Serge Hallynfi
36368228d286cd5c1492ae7aab92b4d78dbfb616Serge Hallyn
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic CrozatAC_ARG_ENABLE([lua],
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat [AC_HELP_STRING([--enable-lua], [enable lua binding])],
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat [enable_lua=yes], [enable_lua=no])
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic CrozatAM_CONDITIONAL([ENABLE_LUA], [test "x$enable_lua" = "xyes"])
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic CrozatAM_COND_IF([ENABLE_LUA],
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat [PKG_CHECK_MODULES([LUA], [$LUAPKGCONFIG >= 5.1],[],[AC_MSG_ERROR([You must install lua-devel for lua 5.1])])
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat AC_DEFINE_UNQUOTED([ENABLE_LUA], 1, [Lua is available])])
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat# Optional test binaries
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic CrozatAC_ARG_ENABLE([tests],
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat [AC_HELP_STRING([--enable-tests], [build test/example binaries])],
36368228d286cd5c1492ae7aab92b4d78dbfb616Serge Hallyn [enable_tests=yes], [enable_tests=no])
36368228d286cd5c1492ae7aab92b4d78dbfb616Serge HallynAM_CONDITIONAL([ENABLE_TESTS], [test "x$enable_tests" = "xyes"])
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat# LXC container path, where the containers are actually stored
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat# This is overridden by an entry in the file called LXCCONF
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat# (i.e. /etc/lxc/lxc.conf)
2e7a16a5a501acd1c1e270bd7b3c423b1aaa5d8bJohannes KastlAC_ARG_WITH([config-path],
2e7a16a5a501acd1c1e270bd7b3c423b1aaa5d8bJohannes Kastl [AC_HELP_STRING(
2e7a16a5a501acd1c1e270bd7b3c423b1aaa5d8bJohannes Kastl [--with-config-path=dir],
2e7a16a5a501acd1c1e270bd7b3c423b1aaa5d8bJohannes Kastl [lxc configuration repository path]
2e7a16a5a501acd1c1e270bd7b3c423b1aaa5d8bJohannes Kastl )], [], [with_config_path=['${localstatedir}/lib/lxc']])
2e7a16a5a501acd1c1e270bd7b3c423b1aaa5d8bJohannes Kastl
17abf2784de1047fb2904ff130ee5efe4ea7b598Elan Ruusamäe# The path of the global lxc configuration file.
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic CrozatAC_ARG_WITH([global-conf],
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat [AC_HELP_STRING(
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat [--with-global-conf=dir],
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat [global lxc configuration file]
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat )], [], [with_global_conf=['${sysconfdir}/lxc/lxc.conf']])
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat# Rootfs path, where the container mount structure is assembled
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. WarfieldAC_ARG_WITH([rootfs-path],
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat [AC_HELP_STRING(
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat [--with-rootfs-path=dir],
2e7a16a5a501acd1c1e270bd7b3c423b1aaa5d8bJohannes Kastl [lxc rootfs mount point]
2e7a16a5a501acd1c1e270bd7b3c423b1aaa5d8bJohannes Kastl )], [], [with_rootfs_path=['${libdir}/lxc/rootfs']])
2e7a16a5a501acd1c1e270bd7b3c423b1aaa5d8bJohannes Kastl
f4936bf19c56a688eec182e1916c8b660e3a0058Jiri Slaby# Container log path. By default, use $lxcpath.
f4936bf19c56a688eec182e1916c8b660e3a0058Jiri SlabyAC_MSG_CHECKING([Whether to place logfiles in container config path])
f4936bf19c56a688eec182e1916c8b660e3a0058Jiri SlabyAC_ARG_ENABLE([configpath-log],
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat [AC_HELP_STRING([--enable-configpath-log], [use logfiles in config path])],
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat [use_configpath_logs=yes], [use_configpath_logs=no])
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic CrozatAC_MSG_RESULT([$use_configpath_logs])
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic CrozatAM_CONDITIONAL([USE_CONFIGPATH_LOGS], [test "$use_configpath_logs" = "yes"])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozatif test "$use_configpath_logs" = "yes"; then
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat default_log_path="${with_config_path}"
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozatelse
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozat default_log_path="${localstatedir}/log/lxc"
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic Crozatfi
d696d21c2a7d5d15b3a456edd8ba742a5970d40aFrederic Crozat
d696d21c2a7d5d15b3a456edd8ba742a5970d40aFrederic CrozatAC_ARG_WITH([log-path],
d696d21c2a7d5d15b3a456edd8ba742a5970d40aFrederic Crozat [AC_HELP_STRING(
d696d21c2a7d5d15b3a456edd8ba742a5970d40aFrederic Crozat [--with-log-path=dir],
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat [per container log path]
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber )], [], [with_log_path=['${default_log_path}']])
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat# Expand some useful variables
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAS_AC_EXPAND(PREFIX, "$prefix")
44ee8a102e3d8052631fbb119f58a55ce678d039Frederic CrozatAS_AC_EXPAND(LIBDIR, "$libdir")
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAS_AC_EXPAND(BINDIR, "$bindir")
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAS_AC_EXPAND(LIBEXECDIR, "$libexecdir")
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAS_AC_EXPAND(INCLUDEDIR, "$includedir")
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAS_AC_EXPAND(SYSCONFDIR, "$sysconfdir")
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAS_AC_EXPAND(DATADIR, "$datadir")
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAS_AC_EXPAND(LOCALSTATEDIR, "$localstatedir")
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAS_AC_EXPAND(DOCDIR, "$docdir")
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAS_AC_EXPAND(LXC_DEFAULT_CONF, "$defaultconf")
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAS_AC_EXPAND(LXCPATH, "$with_config_path")
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAS_AC_EXPAND(LXC_GLOBAL_CONF, "$with_global_conf")
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAS_AC_EXPAND(LXCROOTFSMOUNT, "$with_rootfs_path")
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAS_AC_EXPAND(LXCTEMPLATEDIR, "$datadir/lxc/templates")
285ee6b8f120ebb8f37578081fb4bdc400538306Jiri SlabyAS_AC_EXPAND(LXCHOOKDIR, "$datadir/lxc/hooks")
6d8ac56b658a7aa35a46580c2df060c58ef02821Serge HallynAS_AC_EXPAND(LXCINITDIR, "$libexecdir")
44d397891e691ab994a69766cc72e57265b62da1Serge HallynAS_AC_EXPAND(LOGPATH, "$with_log_path")
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat# Check for some standard kernel headers
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAC_CHECK_HEADERS([linux/unistd.h linux/netlink.h linux/genetlink.h],
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat [],
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat AC_MSG_ERROR([Please install the Linux kernel headers.]),
2e7a16a5a501acd1c1e270bd7b3c423b1aaa5d8bJohannes Kastl [#include <sys/socket.h>])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
e29bf450cafa2ce2564aeb0b64d2014c17228407Dwight Engen# Allow disabling libcap support
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAC_ARG_ENABLE([capabilities],
17abf2784de1047fb2904ff130ee5efe4ea7b598Elan Ruusamäe [AC_HELP_STRING([--disable-capabilities], [disable kernel capabilities])],
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber [], [enable_capabilities=yes])
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber# Check for libcap support
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graberif test "x$enable_capabilities" = "xyes"; then
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber AC_CHECK_LIB(cap,cap_set_proc,caplib=yes,caplib=no)
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber AC_MSG_CHECKING([linux capabilities])
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber if test "x$caplib" = "xyes" ; then
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber CAP_LIBS="-lcap"
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber AC_MSG_RESULT([$CAP_LIBS])
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber else
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber AC_MSG_RESULT([no])
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber AC_MSG_ERROR([You are missing libcap support. If you really want to build without kernel capabilities, use --disable-capabilities])
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber fi
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graberelse
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber CAP_LIBS=""
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graberfi
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane GraberAC_SUBST([CAP_LIBS])
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber# Check for alternate C libraries
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane GraberAC_MSG_CHECKING(for bionic libc)
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane GraberAC_COMPILE_IFELSE([AC_LANG_PROGRAM(
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber [[#ifndef __ANDROID__
17abf2784de1047fb2904ff130ee5efe4ea7b598Elan Ruusamäeerror: Not bionic!
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat#endif]])],
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat [is_bionic=yes],
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat [is_bionic=no])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozatif test "x$is_bionic" = "xyes"; then
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield AC_DEFINE([IS_BIONIC], 1, [bionic libc])
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield AC_MSG_RESULT([yes])
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfieldelse
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield AC_MSG_RESULT([no])
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfieldfi
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. WarfieldAM_CONDITIONAL([IS_BIONIC], [test "x$is_bionic" = "xyes"])
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat# Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat# Check for some headers
c840b37de865195a8742e219b4374d961a21d4d9Frederic CrozatAC_CHECK_HEADERS([sys/signalfd.h pty.h sys/capability.h sys/personality.h utmpx.h sys/timerfd.h])
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield# Check for some syscalls functions
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. WarfieldAC_CHECK_FUNCS([setns pivot_root sethostname unshare])
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield# Check for some functions
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. WarfieldAC_CHECK_LIB(util, openpty)
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. WarfieldAC_CHECK_FUNCS([openpty hasmntopt setmntent endmntent])
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. WarfieldAC_CHECK_FUNCS([getline],
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield AM_CONDITIONAL(HAVE_GETLINE, true)
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield AC_DEFINE(HAVE_GETLINE,1,[Have getline]),
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield AM_CONDITIONAL(HAVE_GETLINE, false))
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. WarfieldAC_CHECK_FUNCS([fgetln],
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield AM_CONDITIONAL(HAVE_FGETLN, true)
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield AC_DEFINE(HAVE_FGETLN,1,[Have fgetln]),
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield AM_CONDITIONAL(HAVE_FGETLN, false))
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield# Check for some libraries
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. WarfieldAC_SEARCH_LIBS(sem_open, [rt pthread])
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. WarfieldAC_SEARCH_LIBS(clock_gettime, [rt])
c01c25fcdd1e0cacad8075bcfcef4c8e8d4b8cb6Stéphane Graber
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield# Check for some standard binaries
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. WarfieldAC_PROG_GCC_TRADITIONAL
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. WarfieldAC_PROG_SED
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfieldif test "x$GCC" = "xyes"; then
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield CFLAGS="$CFLAGS -Wall -Werror"
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfieldfi
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield# Files requiring some variable expansion
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. WarfieldAC_CONFIG_FILES([
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield Makefile
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield lxc.pc
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield lxc.spec
c01c25fcdd1e0cacad8075bcfcef4c8e8d4b8cb6Stéphane Graber config/Makefile
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/Makefile
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/legacy/lxc-ls.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-attach.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-cgroup.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-checkconfig.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-checkpoint.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-clone.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-console.sgml
a7273db9f87f59815d36c3eca4d4501304ae84b2Frederic Crozat doc/lxc-create.sgml
ba4c42597399c72fbb0b8f99e6ded79f738a6ac3Frederic Crozat doc/lxc-destroy.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-device.sgml
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat doc/lxc-execute.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-freeze.sgml
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat doc/lxc-info.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-kill.sgml
eba7df9ee0a1963984ef212e7ddfc0e0835af288Stéphane Graber doc/lxc-ls.sgml
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat doc/lxc-monitor.sgml
f02ce27d4b1a9d01b88d0ffaf626e5bafa671bf0Stéphane Graber doc/lxc-netstat.sgml
f02ce27d4b1a9d01b88d0ffaf626e5bafa671bf0Stéphane Graber doc/lxc-ps.sgml
f02ce27d4b1a9d01b88d0ffaf626e5bafa671bf0Stéphane Graber doc/lxc-restart.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-shutdown.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-start-ephemeral.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-start.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-stop.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-top.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-unfreeze.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-unshare.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-version.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc-wait.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc.conf.sgml
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield doc/lxc.sgml
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat doc/common_options.sgml
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat doc/see_also.sgml
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
80a881b232b8955b85b360d4def99e6e680ff61bSerge Hallyn doc/rootfs/Makefile
80a881b232b8955b85b360d4def99e6e680ff61bSerge Hallyn
d696d21c2a7d5d15b3a456edd8ba742a5970d40aFrederic Crozat doc/examples/Makefile
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat doc/examples/lxc-macvlan.conf
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat doc/examples/lxc-vlan.conf
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat doc/examples/lxc-no-netns.conf
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber doc/examples/lxc-empty-netns.conf
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber doc/examples/lxc-phys.conf
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat doc/examples/lxc-veth.conf
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat doc/examples/lxc-complex.conf
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat hooks/Makefile
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat templates/Makefile
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat templates/lxc-debian
e29bf450cafa2ce2564aeb0b64d2014c17228407Dwight Engen templates/lxc-ubuntu
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat templates/lxc-ubuntu-cloud
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat templates/lxc-opensuse
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber templates/lxc-busybox
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat templates/lxc-fedora
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat templates/lxc-oracle
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat templates/lxc-altlinux
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat templates/lxc-sshd
17abf2784de1047fb2904ff130ee5efe4ea7b598Elan Ruusamäe templates/lxc-archlinux
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber templates/lxc-alpine
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber src/Makefile
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber src/lxc/Makefile
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber src/lxc/lxc-ps
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber src/lxc/lxc-netstat
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber src/lxc/lxc-checkconfig
14d9c0f09d1a55d124ef210a4b4e205c9fe7596cStéphane Graber src/lxc/lxc-version
17abf2784de1047fb2904ff130ee5efe4ea7b598Elan Ruusamäe src/lxc/lxc-create
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat src/lxc/lxc-clone
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat src/lxc/lxc-shutdown
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat src/lxc/lxc-start-ephemeral
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat src/lxc/lxc-destroy
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat src/lxc/legacy/lxc-ls
0ce7569856cc7a366f58688f6b6a71610167fc76Johannes Kastl src/lxc/lxc.functions
8f3a3cd80509d32443072b5f678fdebd04cbc882Johannes Kastl
8f3a3cd80509d32443072b5f678fdebd04cbc882Johannes Kastl src/python-lxc/Makefile
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat src/lua-lxc/Makefile
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat
c840b37de865195a8742e219b4374d961a21d4d9Frederic Crozat src/tests/Makefile
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. Warfield])
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. WarfieldAC_CONFIG_COMMANDS([default],[[]],[[]])
41cf1ac30de569888c70b1f1b40d29993950ff2eMichael H. WarfieldAC_OUTPUT
2e7a16a5a501acd1c1e270bd7b3c423b1aaa5d8bJohannes Kastl