summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2011-10-27 14:40:00 +0200
committerKarel Zak2011-11-03 12:32:49 +0100
commitda396d88367845c61cf88b52cff98dfbdc9e12ce (patch)
tree779b41e393207f6feacc7f57a7520b14663d48eb
parentbuild-sys: cleanup BUILD_MOUNTPOINT (diff)
downloadkernel-qcow2-util-linux-da396d88367845c61cf88b52cff98dfbdc9e12ce.tar.gz
kernel-qcow2-util-linux-da396d88367845c61cf88b52cff98dfbdc9e12ce.tar.xz
kernel-qcow2-util-linux-da396d88367845c61cf88b52cff98dfbdc9e12ce.zip
build-sys: cleanup BUILD_{LS,CH}CPU
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--configure.ac12
-rw-r--r--sys-utils/Makefile.am8
2 files changed, 17 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index a8f2166e7..411405e22 100644
--- a/configure.ac
+++ b/configure.ac
@@ -788,6 +788,18 @@ 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])
+UL_REQUIRES_HAVE([chcpu], [cpu_set_t], [cpu_set_t type])
+AM_CONDITIONAL(BUILD_CHCPU, test "x$build_chcpu" = xyes)
+
AC_ARG_ENABLE([switch_root],
AS_HELP_STRING([--disable-switch_root], [do not build switch_root]),
diff --git a/sys-utils/Makefile.am b/sys-utils/Makefile.am
index 48595dab5..74620e1bf 100644
--- a/sys-utils/Makefile.am
+++ b/sys-utils/Makefile.am
@@ -16,8 +16,9 @@ usrsbin_exec_PROGRAMS += ldattach tunelp rtcwake
dist_man_MANS += dmesg.1 ctrlaltdel.8 cytune.8 setarch.8 \
ldattach.8 tunelp.8 rtcwake.8 fsfreeze.8 fstrim.8
+endif
-if HAVE_CPU_SET_T
+if BUILD_LSCPU
usrbin_exec_PROGRAMS += lscpu
lscpu_SOURCES = lscpu.c $(top_srcdir)/lib/cpuset.c \
$(top_srcdir)/lib/strutils.c \
@@ -25,14 +26,15 @@ lscpu_SOURCES = lscpu.c $(top_srcdir)/lib/cpuset.c \
$(top_srcdir)/lib/tt.c \
$(top_srcdir)/lib/path.c
dist_man_MANS += lscpu.1
+endif
+
+if BUILD_CHCPU
sbin_PROGRAMS += chcpu
chcpu_SOURCES = chcpu.c $(top_srcdir)/lib/cpuset.c \
$(top_srcdir)/lib/path.c
dist_man_MANS += chcpu.8
endif
-endif
-
cytune_SOURCES = cytune.c cyclades.h $(top_srcdir)/lib/strutils.c
tunelp_SOURCES = tunelp.c lp.h
fstrim_SOURCES = fstrim.c $(top_srcdir)/lib/strutils.c