]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: cleanup BUILD_SCHEDUTILS
authorKarel Zak <kzak@redhat.com>
Thu, 27 Oct 2011 14:49:32 +0000 (16:49 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 3 Nov 2011 11:32:50 +0000 (12:32 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
schedutils/Makefile.am

index a2231d4147087d802cabe26c501746693a793034..2332d05da51389d30e764ff6f6f0371cba89eab4 100644 (file)
@@ -741,28 +741,6 @@ UL_REQUIRES_BUILD([mountpoint], [libmount])
 AM_CONDITIONAL(BUILD_MOUNTPOINT, test "x$build_mountpoint" = xyes)
 
 
-
-UL_CHECK_SYSCALL([sched_getaffinity])
-UL_CHECK_SYSCALL([ioprio_set],
-  [alpha],    [442],
-  [i*86],     [289],
-  [ia64*],    [1274],
-  [powerpc*], [273],
-  [s390*],    [282],
-  [sparc*],   [196],
-  [sh*],      [288],
-  [x86_64*],  [251])
-UL_CHECK_SYSCALL([ioprio_get],
-  [alpha],    [443],
-  [i*86],     [290],
-  [ia64*],    [1275],
-  [powerpc*], [274],
-  [s390*],    [283],
-  [sparc*],   [218],
-  [sh*],      [289],
-  [x86_64*],  [252])
-
-
 AC_ARG_ENABLE([fallocate],
   AS_HELP_STRING([--disable-fallocate], [do not build fallocate]),
   [], enable_fallocate=check
@@ -977,7 +955,45 @@ AC_ARG_ENABLE([schedutils],
   AS_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, teskset]),
   [], enable_schedutils=yes
 )
-AM_CONDITIONAL(BUILD_SCHEDUTILS, test "x$enable_schedutils" = xyes)
+build_schedutils=$enable_schedutils
+AM_CONDITIONAL(BUILD_SCHEDUTILS, test "x$build_schedutils" = xyes)
+
+enable_ionice=check
+build_ionice=yes
+UL_REQUIRES_BUILD([ionice], [schedutils])
+UL_REQUIRES_SYSCALL_CHECK([ionice],
+       [UL_CHECK_SYSCALL([ioprio_set],
+         [alpha],    [442],
+         [i*86],     [289],
+         [ia64*],    [1274],
+         [powerpc*], [273],
+         [s390*],    [282],
+         [sparc*],   [196],
+         [sh*],      [288],
+         [x86_64*],  [251])],
+       [ioprio_set])
+
+UL_REQUIRES_SYSCALL_CHECK([ionice],
+       [UL_CHECK_SYSCALL([ioprio_get],
+         [alpha],    [443],
+         [i*86],     [290],
+         [ia64*],    [1275],
+         [powerpc*], [274],
+         [s390*],    [283],
+         [sparc*],   [218],
+         [sh*],      [289],
+         [x86_64*],  [252])],
+       [ioprio_get])
+
+AM_CONDITIONAL(BUILD_IONICE, test "x$build_ionice" = xyes)
+
+enable_taskset=check
+build_taskset=yes
+UL_REQUIRES_BUILD([taskset], [schedutils])
+UL_REQUIRES_SYSCALL_CHECK([taskset],
+       [UL_CHECK_SYSCALL([sched_getaffinity])],
+       [sched_getaffinity])
+AM_CONDITIONAL(BUILD_TASKSET, test "x$build_taskset" = xyes)
 
 
 AC_ARG_ENABLE([wall],
index a2bb0b3228dbd3805b0396b144f4f15721056336..8b82c85c44d6479a0fa6b2b08306a7b12a596303 100644 (file)
@@ -7,15 +7,13 @@ dist_man_MANS = chrt.1
 
 chrt_SOURCES = chrt.c $(srcs_common)
 
-if HAVE_IOPRIO_GET
-if HAVE_IOPRIO_SET
+if BUILD_IONICE
 usrbin_exec_PROGRAMS += ionice
 ionice_SOURCES = ionice.c $(srcs_common)
 dist_man_MANS += ionice.1
 endif
-endif
 
-if HAVE_SCHED_GETAFFINITY
+if BUILD_TASKSET
 usrbin_exec_PROGRAMS += taskset
 taskset_SOURCES = taskset.c $(top_srcdir)/lib/cpuset.c $(srcs_common)
 dist_man_MANS += taskset.1