summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorKarel Zak2011-10-27 16:05:41 +0200
committerKarel Zak2011-11-03 12:32:50 +0100
commita3d3b7702ad23cb002e8ac9d5cb95118c46782f2 (patch)
treed1155377cc9ff0ee5932836d557b042eee4e6aeb /configure.ac
parentbuild-sys: cleanup BUILD_CRAMFS (diff)
downloadkernel-qcow2-util-linux-a3d3b7702ad23cb002e8ac9d5cb95118c46782f2.tar.gz
kernel-qcow2-util-linux-a3d3b7702ad23cb002e8ac9d5cb95118c46782f2.tar.xz
kernel-qcow2-util-linux-a3d3b7702ad23cb002e8ac9d5cb95118c46782f2.zip
build-sys: cleanup BUILD_SWITCH_ROOT
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 5 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index 0afa7b1ac..1e700fb7d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -800,12 +800,14 @@ UL_REQUIRES_LINUX([lsblk])
UL_REQUIRES_BUILD([lsblk], [libblkid])
AM_CONDITIONAL(BUILD_LSBLK, test "x$build_lsblk" = xyes)
+
enable_lscpu=check
build_lscpu=yes
UL_REQUIRES_LINUX([lscpu])
UL_REQUIRES_HAVE([lscpu], [cpu_set_t], [cpu_set_t type])
AM_CONDITIONAL(BUILD_LSCPU, test "x$build_lscpu" = xyes)
+
enable_chcpu=check
build_chcpu=yes
UL_REQUIRES_LINUX([chcpu])
@@ -817,23 +819,9 @@ AC_ARG_ENABLE([switch_root],
AS_HELP_STRING([--disable-switch_root], [do not build switch_root]),
[], enable_switch_root=check
)
-if test "x$enable_switch_root" = xno; then
- build_switch_root=no
-else
- build_switch_root=yes
- case $enable_switch_root:$linux_os in
- yes:no) AC_MSG_ERROR([switch_root selected for non-linux system]);;
- check:no) AC_MSG_WARN([non-linux system; do not build switch_root])
- build_switch_root=no;;
- esac
- if test "x$build_switch_root" = xyes; then
- case $enable_switch_root:$have_openat in
- yes:no) AC_MSG_ERROR([switch_root selected but openat() function not found]);;
- check:no) AC_MSG_WARN([openat() function not found; do not build switch_root])
- build_switch_root=no;;
- esac
- fi
-fi
+build_switch_root=yes
+UL_REQUIRES_LINUX([switch_root])
+UL_REQUIRES_HAVE([switch_root], [openat], [openat function])
AM_CONDITIONAL(BUILD_SWITCH_ROOT, test "x$build_switch_root" = xyes)