When system ncurses is built with --with-termlib=tinfo option
then there are two libraries - libtinfo (which contains terminal
related functions) and libncurses (rest).
Correctly link against libtinfo in such case.
Signed-off-by: Arkadiusz Miskiewicz <arekm@maven.pl>
[], with_slang=no
)
+have_tinfo=no
+AC_CHECK_LIB(tinfo, tgetent, [have_tinfo=yes])
+AM_CONDITIONAL(HAVE_TINFO, test x$have_tinfo = xyes)
+
use_slang=no
if test x$with_slang = xyes; then
AC_CHECK_HEADERS([slcurses.h slang/slcurses.h], [use_slang=yes])
man_MANS = cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \
namei.1 script.1 whereis.1 scriptreplay.1
+if HAVE_TINFO
+cal_LDADD = -ltinfo -lncurses
+else
if HAVE_NCURSES
cal_LDADD = -lncurses
else
cal_LDADD = -ltermcap
endif
endif
+endif
if HAVE_UTIL
script_LDADD = -lutil
if HAVE_NCURSES
usrbinexec_PROGRAMS += setterm
man_MANS += setterm.1
+if HAVE_TINFO
+setterm_LDADD = -ltinfo
+else
setterm_LDADD = -lncurses
endif
+endif
if BUILD_KILL
bin_PROGRAMS += kill
if HAVE_NCURSES
bin_PROGRAMS = more
usrbinexec_PROGRAMS += ul pg
+if HAVE_TINFO
+more_LDADD = -ltinfo
+pg_LDADD = -ltinfo -lncurses
+ul_LDADD = -ltinfo
+else
more_LDADD = -lncurses
pg_LDADD = -lncurses
ul_LDADD = -lncurses
+endif
man_MANS += ul.1 more.1 pg.1
else
if HAVE_TERMCAP