summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMikhail Gusarov2009-10-03 21:42:08 +0200
committerKarel Zak2009-10-06 12:45:42 +0200
commit4205f1fda1ac32046125a2e0f3937b666186bfab (patch)
treead40e47ea3a9121b020a1b1d7e43e9795c0c406e /configure.ac
parentfdformat: fix memory leak in verify_disk() (diff)
downloadkernel-qcow2-util-linux-4205f1fda1ac32046125a2e0f3937b666186bfab.tar.gz
kernel-qcow2-util-linux-4205f1fda1ac32046125a2e0f3937b666186bfab.tar.xz
kernel-qcow2-util-linux-4205f1fda1ac32046125a2e0f3937b666186bfab.zip
unshare: new command
New utility allows to run process with separate mount, UTC, IPC or network namespaces. [kzak@redhat.com: - some cosmetic changes in usage() and err() usage - move "if BUILD_UNSHARE" to separate place in Makefile.am - add unshare to .gitignore] Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4f4cbb39a..07c851fc1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -372,6 +372,20 @@ AM_CONDITIONAL(HAVE_BLKID, test "x$have_blkid" = xyes)
AC_ARG_VAR([BLKID_LIBS_STATIC], [-l options for linking statically with blkid])
+AC_ARG_ENABLE([unshare],
+ AS_HELP_STRING([--disable-unshare], [do not build unshare]),
+ [], enable_unshare=check
+)
+build_unshare=yes
+if test "x$enable_unshare" = xcheck; then
+ if test "x$linux_os" = xno; then
+ AC_MSG_WARN([non-linux system; do not build unshare])
+ build_unshare=no
+ fi
+elif test "x$enable_unshare" = xno; then
+ build_unshare=no
+fi
+AM_CONDITIONAL(BUILD_UNSHARE, test "x$build_unshare" = xyes)
UTIL_CHECK_LIB(util, openpty)
UTIL_CHECK_LIB(termcap, tgetnum)
@@ -563,6 +577,10 @@ dnl fallocate could be available as libc function or as syscall only
UTIL_CHECK_SYSCALL([fallocate])
AC_CHECK_FUNCS([fallocate])
+dnl unshare could be available as libc function or as syscall only
+UTIL_CHECK_SYSCALL([unshare])
+AC_CHECK_FUNCS([unshare])
+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <time.h>
#include <unistd.h>