]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: add --disable-setterm
authorKarel Zak <kzak@redhat.com>
Fri, 26 Apr 2013 11:47:54 +0000 (13:47 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 26 Apr 2013 11:47:54 +0000 (13:47 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
term-utils/Makemodule.am

index 94c4fe1263926e7595f3f41d963545b1557af889..c1dff15f158bd83375f0efc9a7f497b43cc97a31 100644 (file)
@@ -1294,6 +1294,16 @@ UL_REQUIRES_HAVE([pg], [ncurses], [ncurses or ncursesw library])
 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
index f4fa92d4a33e0ca0a7f502d9b2dd6a2f85159a48..470987344b19b861888e26c4c2c7b7b1d539aa81 100644 (file)
@@ -24,13 +24,10 @@ agetty_LDADD = $(LDADD) libcommon.la
 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