AM_CONDITIONAL(BUILD_PG, test "x$build_pg" = xyes)
+AC_ARG_ENABLE([setterm],
+ AS_HELP_STRING([--disable-setterm], [do not build setterm]),
+ [], enable_setterm=check
+)
+UL_BUILD_INIT([setterm])
+UL_REQUIRES_LINUX([setterm])
+UL_REQUIRES_HAVE([setterm], [ncurses], [ncurses library])
+AM_CONDITIONAL(BUILD_SETTERM, test "x$build_setterm" = xyes)
+
+
AC_ARG_ENABLE([schedutils],
AS_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, teskset]),
[], enable_schedutils=yes
endif # BUILD_AGETTY
-# TODO: add BUILD_SETTERM to configure.am
-if HAVE_NCURSES
-if LINUX
+if BUILD_SETTERM
usrbin_exec_PROGRAMS += setterm
dist_man_MANS += term-utils/setterm.1
setterm_SOURCES = term-utils/setterm.c
-endif
if HAVE_TINFO
setterm_LDADD = $(LDADD) -ltinfo
else