]> git.proxmox.com Git - mirror_lxc.git/blobdiff - configure.ac
Introduce support for seccomp.
[mirror_lxc.git] / configure.ac
index 3c8c105e4c4e8cbdba5e4453d8f5ef9cf22c5061..a3b961663d0de01ff329a58ad0f9d89d860bb47c 100644 (file)
@@ -1,7 +1,7 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
 
-AC_INIT([lxc], [0.7.1])
+AC_INIT([lxc], [0.8.0])
 
 AC_CONFIG_SRCDIR([configure.ac])
 AC_CONFIG_AUX_DIR([config])
@@ -12,6 +12,22 @@ AM_PROG_CC_C_O
 AC_GNU_SOURCE
 AC_CHECK_PROG(SETCAP, setcap, yes, no, $PATH$PATH_SEPARATOR/sbin)
 
+AC_ARG_ENABLE([rpath],
+       [AC_HELP_STRING([--disable-rpath], [do not set rpath in executables])],
+       [], [enable_rpath=yes])
+
+AM_CONDITIONAL([ENABLE_RPATH], [test "x$enable_rpath" = "xyes"])
+
+AC_ARG_ENABLE([apparmor],
+       [AC_HELP_STRING([--enable-apparmor], [enable apparmor])],
+       [], [enable_apparmor=yes])
+AM_CONDITIONAL([ENABLE_APPARMOR], [test "x$enable_apparmor" = "xyes"])
+
+AC_ARG_ENABLE([seccomp],
+       [AC_HELP_STRING([--enable-seccomp], [enable seccomp])],
+       [], [enable_seccomp=yes])
+AM_CONDITIONAL([ENABLE_SECCOMP], [test "x$enable_seccomp" = "xyes"])
+
 AC_ARG_ENABLE([doc],
        [AC_HELP_STRING([--enable-doc], [make mans (require docbook2man installed) [default=auto]])],
        [], [enable_doc=auto])
@@ -23,6 +39,16 @@ if test "x$enable_doc" = "xyes" -o "x$enable_doc" = "xauto"; then
                AC_MSG_ERROR([docbook2man required by man request, but not found])
 fi
 
+AM_COND_IF([ENABLE_APPARMOR],
+    [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_SUBST([APPARMOR_LIBS], [-lapparmor])])
+
+AM_COND_IF([ENABLE_SECCOMP],
+    [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_SUBST([SECCOMP_LIBS], [-lseccomp])])
+
 AM_CONDITIONAL([ENABLE_DOCBOOK], [test "x$have_docbook" = "xyes"])
 
 AC_ARG_ENABLE([examples],
@@ -34,6 +60,7 @@ AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"])
 AS_AC_EXPAND(PREFIX, $prefix)
 AS_AC_EXPAND(LIBDIR, $libdir)
 AS_AC_EXPAND(BINDIR, $bindir)
+AS_AC_EXPAND(LIBEXECDIR, $libexecdir)
 AS_AC_EXPAND(INCLUDEDIR, $includedir)
 AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
 AS_AC_EXPAND(DATADIR, $datadir)
@@ -44,34 +71,28 @@ AC_ARG_WITH([config-path],
        [AC_HELP_STRING(
                [--with-config-path=dir],
                [lxc configuration repository path]
-       )], [], [with_config_path="${localstatedir}/lib/lxc"])
+       )], [], [with_config_path=['${localstatedir}/lib/lxc']])
 
 AC_ARG_WITH([rootfs-path],
        [AC_HELP_STRING(
                [--with-rootfs-path=dir],
                [lxc rootfs mount point]
-       )], [], [with_rootfs_path="${libdir}/lxc/rootfs"])
+       )], [], [with_rootfs_path=['${libdir}/lxc/rootfs']])
 
 AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date)")
-
 AS_AC_EXPAND(LXCPATH, "${with_config_path}")
 AS_AC_EXPAND(LXCROOTFSMOUNT, "${with_rootfs_path}")
-AS_AC_EXPAND(LXCINITDIR, $libdir/lxc)
-AS_AC_EXPAND(LXCTEMPLATEDIR, $libdir/lxc/templates)
-AH_TEMPLATE([LXCPATH], [lxc configuration repository])
-AH_TEMPLATE([LXCINITDIR], [lxc-init directory location])
-AH_TEMPLATE([LXCROOTFSMOUNT], [lxc default rootfs mount point])
-AC_DEFINE_UNQUOTED(LXCPATH, "$LXCPATH")
-AC_DEFINE_UNQUOTED(LXCINITDIR, "$LXCINITDIR")
-AC_DEFINE_UNQUOTED(LXCROOTFSMOUNT, "$LXCROOTFSMOUNT")
-
-AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h],
+AS_AC_EXPAND(LXCTEMPLATEDIR, ['${datadir}/lxc/templates'])
+
+AC_SUBST(LXCINITDIR, ['${libexecdir}'])
+
+AC_CHECK_HEADERS([linux/unistd.h linux/netlink.h linux/genetlink.h],
                                  [],
-                                 AC_MSG_ERROR([netlink headers not found. Please install the linux kernel headers.]),
+                                 AC_MSG_ERROR([Please install the Linux kernel headers.]),
                                  [#include <sys/socket.h>
                 ])
 
-AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([please install libcap-devel.]),
+AC_CHECK_HEADERS([sys/capability.h], [], AC_MSG_ERROR([Please install the libcap development files.]),
 [#include <sys/types.h>
 #include <sys/capability.h>])
 AC_CHECK_LIB(cap,cap_set_proc,caplib=yes,caplib=no)
@@ -118,6 +139,7 @@ AC_CONFIG_FILES([
        doc/lxc-ps.sgml
        doc/lxc-cgroup.sgml
        doc/lxc-kill.sgml
+       doc/lxc-attach.sgml
        doc/lxc.conf.sgml
        doc/lxc.sgml
        doc/common_options.sgml
@@ -135,11 +157,16 @@ AC_CONFIG_FILES([
        doc/examples/lxc-complex.conf
 
        templates/Makefile
+       templates/lxc-lenny
        templates/lxc-debian
        templates/lxc-ubuntu
+       templates/lxc-ubuntu-cloud
+       templates/lxc-opensuse
        templates/lxc-busybox
        templates/lxc-fedora
+       templates/lxc-altlinux
        templates/lxc-sshd
+       templates/lxc-archlinux
 
        src/Makefile
        src/lxc/Makefile
@@ -151,6 +178,8 @@ AC_CONFIG_FILES([
        src/lxc/lxc-setuid
        src/lxc/lxc-version
        src/lxc/lxc-create
+       src/lxc/lxc-clone
+       src/lxc/lxc-shutdown
        src/lxc/lxc-destroy
 
 ])