diff options
author | Karel Zak | 2013-10-04 13:28:37 +0200 |
---|---|---|
committer | Karel Zak | 2013-10-04 13:28:37 +0200 |
commit | ccf92e6db7c22cbde2d2c12cc7328d67e9bacdf3 (patch) | |
tree | 8b73970ce0050e0b3cacd84f9889771a2b44ce6d /configure.ac | |
parent | libfdisk: cleanup warning messages (diff) | |
download | kernel-qcow2-util-linux-ccf92e6db7c22cbde2d2c12cc7328d67e9bacdf3.tar.gz kernel-qcow2-util-linux-ccf92e6db7c22cbde2d2c12cc7328d67e9bacdf3.tar.xz kernel-qcow2-util-linux-ccf92e6db7c22cbde2d2c12cc7328d67e9bacdf3.zip |
build-sys: use tinfo *or* ncurses for more(1), ul(1) and setterm(1)
* it seems that we don't have to link the utils with ncurses, tinfo is enough.
This change saves one unnecessary dependence.
* libtinfo is also distributed with pkg-config files, so we can use
PKG_CHECK_MODULES() as a primary source for LIBS and CFLAGS.
* add TINFO_CFLAGS (although it's probably always empty)
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 93572fe8a..c898f6103 100644 --- a/configure.ac +++ b/configure.ac @@ -674,15 +674,20 @@ AS_IF([test "x$with_slang" = xyes], [ ]) AM_CONDITIONAL([HAVE_SLANG], [test "x$have_slang" = xyes]) - AM_CONDITIONAL([BUILD_CFDISK], [test "x$have_slang" = xyes -o "x$have_ncurses" = xyes]) -AC_CHECK_LIB([tinfo], [tgetent], [have_tinfo=yes]) -AS_IF([test "x$have_tinfo" = xyes], [ - TINFO_LIBS="-ltinfo" +dnl Try pkg-config for libtinfo +PKG_CHECK_MODULES(TINFO, [tinfo], [have_tinfo=yes], [ + dnl If that failed, fall back to classic searching. + AC_CHECK_LIB([tinfo], [tgetent], [ + have_tinfo=yes + TINFO_LIBS="-ltinfo" + TINFO_CFLAGS=""]) ]) AC_SUBST([TINFO_LIBS]) +AC_SUBST([TINFO_CFLAGS]) +AM_CONDITIONAL([HAVE_TINFO], [test "x$have_tinfo" = xxyes]) AC_ARG_WITH([utempter], |