diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
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> |