# Process this file with autoconf to produce a configure script.
m4_define([lxc_version_major], 1)
-m4_define([lxc_version_minor], 0)
+m4_define([lxc_version_minor], 1)
m4_define([lxc_version_micro], 0)
-m4_define([lxc_version_beta], [rc4])
+m4_define([lxc_version_beta], [])
m4_define([lxc_version_base], [lxc_version_major.lxc_version_minor.lxc_version_micro])
m4_define([lxc_version],
with_distro="unknown"
fi
case $with_distro in
- ubuntu)
- distroconf=default.conf.ubuntu
+ ubuntu|raspbian)
+ distroconf=default.conf.lxcbr
+ distrosysconf="$sysconfdir/default"
;;
- redhat|centos|fedora|oracle|oracleserver)
- distroconf=default.conf.libvirt
+ redhat|centos|fedora|oracle|oracleserver|suse|opensuse*)
+ distroconf=default.conf.lxcbr
+ distrosysconf="$sysconfdir/sysconfig"
;;
*)
distroconf=default.conf.unknown
+ distrosysconf="$sysconfdir/default"
;;
esac
AC_MSG_RESULT([$with_distro])
-AM_CONDITIONAL([HAVE_DEBIAN], [test x"$with_distro" = "xdebian" -o x"$with_distro" = "xubuntu"])
+AM_CONDITIONAL([HAVE_DEBIAN], [test x"$with_distro" = "xdebian" -o x"$with_distro" = "xubuntu" -o x"$with_distro" = "xraspbian"])
AM_CONDITIONAL([DISTRO_UBUNTU], [test "x$with_distro" = "xubuntu"])
+AC_CONFIG_LINKS([config/etc/default.conf:config/etc/${distroconf}])
+
# Check for init system type
AC_MSG_CHECKING([for init system type])
AC_ARG_WITH([init-script],
case "$with_init_script" in
distro)
case $with_distro in
- fedora)
+ fedora|opensuse*)
init_script=systemd
;;
redhat|centos|oracle|oracleserver)
init_script=sysvinit
;;
- debian)
+ debian|raspbian)
init_script=upstart,systemd
;;
ubuntu)
- init_script=upstart
+ init_script=upstart,systemd
;;
*)
echo -n "Linux distribution init system unknown."
AM_CONDITIONAL([INIT_SCRIPT_UPSTART], [echo "$init_script" |grep -q "upstart"])
AC_MSG_RESULT($init_script)
+# systemd unit dir
+AC_ARG_WITH([systemdsystemunitdir],
+ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
+ [],
+ [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+if test -z "$with_systemdsystemunitdir"; then
+ with_systemdsystemunitdir=/lib/systemd/system
+fi
+if test "x$with_systemdsystemunitdir" != "xno"; then
+ AC_SUBST([SYSTEMD_UNIT_DIR], [$with_systemdsystemunitdir])
+fi
+
# Allow disabling rpath
AC_ARG_ENABLE([rpath],
[AC_HELP_STRING([--enable-rpath], [set rpath in executables [default=no]])],
AM_CONDITIONAL([ENABLE_SELINUX], [test "x$enable_selinux" = "xyes"])
AM_COND_IF([ENABLE_SELINUX],
[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_SUBST([SELINUX_LIBS])])
+ AC_CHECK_LIB([selinux], [setexeccon_raw],[true],[AC_MSG_ERROR([You must install the SELinux development package in order to compile lxc])])
+ AC_SUBST([SELINUX_LIBS], [-lselinux])])
# Seccomp syscall filter
AC_ARG_ENABLE([seccomp],
PKG_CHECK_MODULES([DBUS], [dbus-1 >= 1.2.16])
])
+AC_MSG_CHECKING(for get_pid_cgroup_abs_sync)
+save_LIBS=$LIBS
+AC_SEARCH_LIBS([cgmanager_get_pid_cgroup_abs_sync], [cgmanager], [have_abs_cgroups=yes], [have_abs_cgroups=no], [-lnih -lnih-dbus -ldbus-1])
+LIBS=$save_LIBS
+if test "x$have_abs_cgroups" = "xyes"; then
+ AC_DEFINE([HAVE_CGMANAGER_GET_PID_CGROUP_ABS_SYNC], 1, [Have cgmanager_get_pid_cgroup_abs_sync])
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+
+AC_MSG_CHECKING(for cgmanager_list_controllers)
+save_LIBS=$LIBS
+AC_SEARCH_LIBS([cgmanager_list_controllers_sync], [cgmanager], [have_list_controllers=yes], [have_list_controllers=no], [-lnih -lnih-dbus -ldbus-1])
+LIBS=$save_LIBS
+if test "x$have_list_controllers" = "xyes"; then
+ AC_DEFINE([HAVE_CGMANAGER_LIST_CONTROLLERS], 1, [Have cgmanager_list_controllers])
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+
+# Check for static libcap, make sure the function checked for differs from the
+# the one checked below so the cache doesn't give a wrong answer
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -static"
+AC_CHECK_LIB([cap],[cap_init],[have_static_libcap=yes],[have_static_libcap=no])
+AM_CONDITIONAL([HAVE_STATIC_LIBCAP], [test "x$have_static_libcap" = "xyes"])
+if test "x$have_static_libcap" = "xyes"; then
+ AC_DEFINE([HAVE_STATIC_LIBCAP], 1, [Have static libcap])
+fi
+CFLAGS="$OLD_CFLAGS"
+
+
# Linux capabilities
AC_ARG_ENABLE([capabilities],
[AC_HELP_STRING([--enable-capabilities], [enable kernel capabilities support [default=auto]])],
AM_CONDITIONAL([ENABLE_CAP], [test "x$enable_capabilities" = "xyes"])
AM_COND_IF([ENABLE_CAP],
- [AC_CHECK_LIB(cap,cap_set_proc,[],[AC_MSG_ERROR([You are missing libcap support.])])
+ [AC_CHECK_LIB(cap,cap_set_proc,[true],[AC_MSG_ERROR([You are missing libcap support.])])
AC_SUBST([CAP_LIBS], [-lcap])])
# HAVE_SCMP_FILTER_CTX=1 will tell us we have libseccomp api >= 1.0.0
PKG_CHECK_VAR([LUA_VERSION], [$LUAPKGCONFIG], [V],,
[PKG_CHECK_VAR([LUA_VERSION], [$LUAPKGCONFIG], [major_version])])
AC_MSG_RESULT([$LUA_VERSION])
- PKG_CHECK_VAR([LUA_INSTALL_CMOD], [$LUAPKGCONFIG], [INSTALL_CMOD],,
- [LUA_INSTALL_CMOD=$libdir/lua/$LUA_VERSION])
- PKG_CHECK_VAR([LUA_INSTALL_LMOD], [$LUAPKGCONFIG], [INSTALL_LMOD],,
- [LUA_INSTALL_LMOD=$datadir/lua/$LUA_VERSION])
+ AC_SUBST([LUA_LIBDIR], [$libdir/lua/$LUA_VERSION])
+ AC_SUBST([LUA_SHAREDIR], [$datadir/lua/$LUA_VERSION])
])
# Optional bash integration
AS_AC_EXPAND(PREFIX, "$prefix")
AS_AC_EXPAND(LIBDIR, "$libdir")
AS_AC_EXPAND(BINDIR, "$bindir")
+AS_AC_EXPAND(SBINDIR, "$sbindir")
AS_AC_EXPAND(LIBEXECDIR, "$libexecdir")
AS_AC_EXPAND(INCLUDEDIR, "$includedir")
AS_AC_EXPAND(SYSCONFDIR, "$sysconfdir")
AS_AC_EXPAND(DATADIR, "$datadir")
AS_AC_EXPAND(LOCALSTATEDIR, "$localstatedir")
AS_AC_EXPAND(DOCDIR, "$docdir")
-AS_AC_EXPAND(LXC_DISTRO_CONF, "$distroconf")
AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
AS_AC_EXPAND(LXCPATH, "$with_config_path")
AS_AC_EXPAND(LXC_GLOBAL_CONF, "$with_global_conf")
AS_AC_EXPAND(LXC_USERNIC_CONF, "$with_usernic_conf")
AS_AC_EXPAND(LXC_USERNIC_DB, "$with_usernic_db")
+AS_AC_EXPAND(LXC_DISTRO_SYSCONF, "$distrosysconf")
AS_AC_EXPAND(LXCROOTFSMOUNT, "$with_rootfs_path")
AS_AC_EXPAND(LXCTEMPLATEDIR, "$datadir/lxc/templates")
AS_AC_EXPAND(LXCTEMPLATECONFIG, "$datadir/lxc/config")
AS_AC_EXPAND(RUNTIME_PATH, "$with_runtime_path")
AC_SUBST(DEFAULT_CGROUP_PATTERN, ["$with_cgroup_pattern"])
+# We need the install path so criu knows where to reference the hook scripts.
+AC_DEFINE_UNQUOTED([DATADIR], "$DATADIR", ["Prefix for shared files."])
+
# Check for some standard kernel headers
AC_CHECK_HEADERS([linux/unistd.h linux/netlink.h linux/genetlink.h],
[],
# Check for some functions
AC_CHECK_LIB(pthread, main)
AC_CHECK_FUNCS(pthread_atfork)
+AC_CHECK_FUNCS(statvfs)
AC_CHECK_LIB(util, openpty)
AC_CHECK_FUNCS([openpty hasmntopt setmntent endmntent utmpxname])
AC_CHECK_FUNCS([getline],
config/Makefile
config/apparmor/Makefile
+ config/selinux/Makefile
config/bash/Makefile
config/bash/lxc
config/init/Makefile
- config/init/sysvinit/Makefile
+ config/init/common/Makefile
+ config/init/common/lxc-containers
+ config/init/common/lxc-net
config/init/systemd/Makefile
+ config/init/systemd/lxc.service
+ config/init/systemd/lxc@.service
+ config/init/systemd/lxc-net.service
+ config/init/sysvinit/Makefile
+ config/init/sysvinit/lxc-containers
+ config/init/sysvinit/lxc-net
+ config/init/upstart/lxc-net.conf
config/init/upstart/Makefile
config/etc/Makefile
config/templates/Makefile
+ config/templates/archlinux.common.conf
+ config/templates/archlinux.userns.conf
config/templates/centos.common.conf
config/templates/centos.userns.conf
+ config/templates/common.conf
+ config/templates/common.conf.d/Makefile
config/templates/debian.common.conf
config/templates/debian.userns.conf
config/templates/fedora.common.conf
config/templates/gentoo.common.conf
config/templates/gentoo.moresecure.conf
config/templates/gentoo.userns.conf
+ config/templates/opensuse.common.conf
+ config/templates/opensuse.userns.conf
config/templates/oracle.common.conf
config/templates/oracle.userns.conf
config/templates/plamo.common.conf
config/templates/ubuntu.common.conf
config/templates/ubuntu.lucid.conf
config/templates/ubuntu.userns.conf
+ config/templates/openwrt.common.conf
+ config/templates/userns.conf
+ config/yum/Makefile
+ config/sysconfig/Makefile
+ config/sysconfig/lxc
doc/Makefile
doc/api/Makefile
doc/lxc-autostart.sgml
doc/lxc-cgroup.sgml
doc/lxc-checkconfig.sgml
+ doc/lxc-checkpoint.sgml
doc/lxc-clone.sgml
doc/lxc-config.sgml
doc/lxc-console.sgml
doc/ja/lxc-autostart.sgml
doc/ja/lxc-cgroup.sgml
doc/ja/lxc-checkconfig.sgml
+ doc/ja/lxc-checkpoint.sgml
doc/ja/lxc-clone.sgml
doc/ja/lxc-config.sgml
doc/ja/lxc-console.sgml
doc/ja/common_options.sgml
doc/ja/see_also.sgml
+ doc/ko/Makefile
+ doc/ko/legacy/lxc-ls.sgml
+ doc/ko/lxc-attach.sgml
+ doc/ko/lxc-autostart.sgml
+ doc/ko/lxc-cgroup.sgml
+ doc/ko/lxc-checkconfig.sgml
+ doc/ko/lxc-checkpoint.sgml
+ doc/ko/lxc-clone.sgml
+ doc/ko/lxc-config.sgml
+ doc/ko/lxc-console.sgml
+ doc/ko/lxc-create.sgml
+ doc/ko/lxc-destroy.sgml
+ doc/ko/lxc-device.sgml
+ doc/ko/lxc-execute.sgml
+ doc/ko/lxc-freeze.sgml
+ doc/ko/lxc-info.sgml
+ doc/ko/lxc-ls.sgml
+ doc/ko/lxc-monitor.sgml
+ doc/ko/lxc-snapshot.sgml
+ doc/ko/lxc-start-ephemeral.sgml
+ doc/ko/lxc-start.sgml
+ doc/ko/lxc-stop.sgml
+ doc/ko/lxc-top.sgml
+ doc/ko/lxc-unfreeze.sgml
+ doc/ko/lxc-unshare.sgml
+ doc/ko/lxc-user-nic.sgml
+ doc/ko/lxc-usernsexec.sgml
+ doc/ko/lxc-wait.sgml
+
+ doc/ko/lxc.conf.sgml
+ doc/ko/lxc.container.conf.sgml
+ doc/ko/lxc.system.conf.sgml
+ doc/ko/lxc-usernet.sgml
+ doc/ko/lxc.sgml
+ doc/ko/common_options.sgml
+ doc/ko/see_also.sgml
+
hooks/Makefile
templates/Makefile
src/Makefile
src/lxc/Makefile
src/lxc/lxc-checkconfig
+ src/lxc/lxc-ls
src/lxc/lxc-start-ephemeral
src/lxc/legacy/lxc-ls
src/lxc/lxc.functions
src/lxc/version.h
src/python-lxc/Makefile
+ src/python-lxc/setup.py
src/lua-lxc/Makefile