]> git.proxmox.com Git - mirror_lxc.git/blobdiff - configure.ac
Merge pull request #1321 from brauner/2016-11-25/cleanup_monitor
[mirror_lxc.git] / configure.ac
index 0103579a06799b8f5633741fe10dafc72060a912..9b0b8e151fa23a6890d67745eb39d766923fcf16 100644 (file)
@@ -1,11 +1,16 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
 
+m4_define([lxc_devel], 1)
 m4_define([lxc_version_major], 2)
 m4_define([lxc_version_minor], 0)
 m4_define([lxc_version_micro], 0)
 m4_define([lxc_version_beta], [])
-m4_define([lxc_version_abi], 1.2.0)
+
+m4_define([lxc_abi_major], 1)
+m4_define([lxc_abi_minor], 2)
+m4_define([lxc_abi_micro], 0)
+m4_define([lxc_abi], [lxc_abi_major.lxc_abi_minor.lxc_abi_micro])
 
 m4_define([lxc_version_base], [lxc_version_major.lxc_version_minor.lxc_version_micro])
 m4_define([lxc_version],
@@ -22,8 +27,13 @@ AC_SUBST(LXC_VERSION_BETA, lxc_version_beta)
 AC_SUBST([LXC_VERSION_MAJOR], [lxc_version_major])
 AC_SUBST([LXC_VERSION_MINOR], [lxc_version_minor])
 AC_SUBST([LXC_VERSION_MICRO], [lxc_version_micro])
-AC_SUBST([LXC_VERSION_ABI], [lxc_version_abi])
 AC_SUBST([LXC_VERSION], [lxc_version])
+AC_SUBST([LXC_DEVEL], [lxc_devel])
+
+AC_SUBST([LXC_ABI_MAJOR], [lxc_abi_major])
+AC_SUBST([LXC_ABI_MINOR], [lxc_abi_minor])
+AC_SUBST([LXC_ABI_MICRO], [lxc_abi_micro])
+AC_SUBST([LXC_ABI], [lxc_abi])
 
 AC_CONFIG_SRCDIR([configure.ac])
 AC_CONFIG_AUX_DIR([config])
@@ -33,6 +43,10 @@ AC_CANONICAL_HOST
 AM_PROG_CC_C_O
 AC_GNU_SOURCE
 
+# libtool
+LT_INIT
+AC_SUBST([LIBTOOL_DEPS])
+
 # Detect the distribution. This is used for the default configuration and
 # for some distro-specific build options.
 AC_MSG_CHECKING([host distribution])
@@ -465,6 +479,14 @@ AC_ARG_ENABLE([bash],
        [], [enable_bash=yes])
 AM_CONDITIONAL([ENABLE_BASH], [test "x$enable_bash" = "xyes"])
 
+AM_COND_IF([ENABLE_BASH],
+       [AC_MSG_CHECKING([bash completion directory])
+       PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir], ,
+               bashcompdir="${sysconfdir}/bash_completion.d")
+       AC_MSG_RESULT([$bashcompdir])
+       AC_SUBST(bashcompdir)
+       ])
+
 # Optional test binaries
 AC_ARG_ENABLE([tests],
        [AC_HELP_STRING([--enable-tests], [build test/example binaries [default=no]])],
@@ -598,11 +620,15 @@ AM_CONDITIONAL([IS_BIONIC], [test "x$is_bionic" = "xyes"])
 # Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
 AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
 
+# Some systems lack PR_{G,S}ET_NO_NEW_PRIVS definition => HAVE_DECL_PR_{G,S}ET_NO_NEW_PRIVS
+AC_CHECK_DECLS([PR_SET_NO_NEW_PRIVS], [], [], [#include <sys/prctl.h>])
+AC_CHECK_DECLS([PR_GET_NO_NEW_PRIVS], [], [], [#include <sys/prctl.h>])
+
 # Check for some headers
-AC_CHECK_HEADERS([sys/signalfd.h pty.h ifaddrs.h sys/capability.h sys/personality.h utmpx.h sys/timerfd.h])
+AC_CHECK_HEADERS([sys/signalfd.h pty.h ifaddrs.h sys/capability.h sys/memfd.h sys/personality.h utmpx.h sys/timerfd.h])
 
 # Check for some syscalls functions
-AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat])
+AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat gettid memfd_create])
 
 # Check for some functions
 AC_CHECK_LIB(pthread, main)
@@ -637,7 +663,7 @@ LXC_CHECK_TLS
 if test "x$GCC" = "xyes"; then
        CFLAGS="$CFLAGS -Wall"
        if test "x$enable_werror" = "xyes"; then
-               CFLAGS="$CFLAGS -Werror"
+               CFLAGS="$CFLAGS -Werror -Werror=vla"
        fi
 fi
 
@@ -701,6 +727,8 @@ AC_CONFIG_FILES([
        config/templates/openwrt.common.conf
        config/templates/sparclinux.common.conf
        config/templates/sparclinux.userns.conf
+       config/templates/voidlinux.common.conf
+       config/templates/voidlinux.userns.conf
        config/templates/userns.conf
        config/yum/Makefile
        config/sysconfig/Makefile
@@ -852,6 +880,7 @@ AC_CONFIG_FILES([
        templates/lxc-ubuntu
        templates/lxc-ubuntu-cloud
        templates/lxc-sparclinux
+       templates/lxc-voidlinux
 
        src/Makefile
        src/lxc/Makefile