Some architectures do no reliably provide sched_getaffinity, so make sure the
define exists before we try using it.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
[AM_CONDITIONAL(HAVE_PIVOT_ROOT, false)])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/syscall.h>
+#include <unistd.h>
+]], [[
+int test = SYS_sched_getaffinity;
+]])],
+[AM_CONDITIONAL(HAVE_SCHED_GETAFFINITY, true)],
+[AM_CONDITIONAL(HAVE_SCHED_GETAFFINITY, false)])
+
+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <time.h>
#include <unistd.h>
if BUILD_SCHEDUTILS
-usrbinexec_PROGRAMS = chrt ionice taskset
-man_MANS = chrt.1 ionice.1 taskset.1
+usrbinexec_PROGRAMS = chrt ionice
+man_MANS = chrt.1 ionice.1
+
+if HAVE_SCHED_GETAFFINITY
+usrbinexec_PROGRAMS += taskset
+man_MANS += taskset.1
+endif
endif