summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorKarel Zak2011-10-27 15:51:28 +0200
committerKarel Zak2011-11-03 12:32:50 +0100
commita2ea6670bb3e1993385639e9d99b69f797486002 (patch)
tree1f5f4356f981db8a6c7795bce193dc5092cc6411 /configure.ac
parentbuild-sys: cleanup BUILD_FALLOCATE (diff)
downloadkernel-qcow2-util-linux-a2ea6670bb3e1993385639e9d99b69f797486002.tar.gz
kernel-qcow2-util-linux-a2ea6670bb3e1993385639e9d99b69f797486002.tar.xz
kernel-qcow2-util-linux-a2ea6670bb3e1993385639e9d99b69f797486002.zip
build-sys: cleanup BUILD_UNSHARE
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac40
1 files changed, 11 insertions, 29 deletions
diff --git a/configure.ac b/configure.ac
index e04622305..70d50a91e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -735,10 +735,17 @@ if test "x$build_fallocate" = xyes; then
fi
-dnl unshare could be available as libc function or as syscall only
-UL_CHECK_SYSCALL([unshare])
-AC_CHECK_FUNCS([unshare])
-
+AC_ARG_ENABLE([unshare],
+ AS_HELP_STRING([--disable-unshare], [do not build unshare]),
+ [], enable_unshare=check
+)
+build_unshare=yes
+UL_REQUIRES_LINUX([unshare])
+UL_REQUIRES_SYSCALL_CHECK([unshare], [UL_CHECK_SYSCALL([unshare])])
+AM_CONDITIONAL(BUILD_UNSHARE, test "x$build_unshare" = xyes)
+if test "x$build_unshare" = xyes; then
+ AC_CHECK_FUNCS([unshare])
+fi
UL_SET_ARCH(I86, i?86-*)
@@ -855,31 +862,6 @@ AM_CONDITIONAL(BUILD_PIVOT_ROOT, test "x$build_pivot_root" = xyes)
-AC_ARG_ENABLE([unshare],
- AS_HELP_STRING([--disable-unshare], [do not build unshare]),
- [], enable_unshare=check
-)
-if test "x$enable_unshare" = xno; then
- build_unshare=no
-else
- build_unshare=yes
- case $enable_unshare:$linux_os in
- yes:no) AC_MSG_ERROR([unshare selected for non-linux system]);;
- check:no) AC_MSG_WARN([non-linux system; do not build unshare])
- build_unshare=no;;
- esac
- if test "x$build_unshare" = xyes; then
- case $enable_unshare:$ul_cv_syscall_unshare in
- yes:no) AC_MSG_ERROR([unshare selected but unshare syscall not found]);;
- check:no) AC_MSG_WARN([unshare syscall not found; do not build unshare])
- build_unshare=no;;
- esac
- fi
-fi
-AM_CONDITIONAL(BUILD_UNSHARE, test "x$build_unshare" = xyes)
-
-
-
AC_ARG_ENABLE([elvtune],
AS_HELP_STRING([--enable-elvtune], [build elvtune (only works with 2.2 and 2.4 kernels)]),
[], enable_elvtune=no