diff options
author | Karel Zak | 2017-09-19 12:55:49 +0200 |
---|---|---|
committer | Karel Zak | 2017-09-19 12:55:49 +0200 |
commit | ad442a818c6eefabb8258a9949206e12f2296161 (patch) | |
tree | cfa781ac84bb453f854dc152c80cae0a6a36cfc4 /configure.ac | |
parent | su: (pty) improve SIGSTOP/SIGCONT semantic (diff) | |
download | kernel-qcow2-util-linux-ad442a818c6eefabb8258a9949206e12f2296161.tar.gz kernel-qcow2-util-linux-ad442a818c6eefabb8258a9949206e12f2296161.tar.xz kernel-qcow2-util-linux-ad442a818c6eefabb8258a9949206e12f2296161.zip |
build-sys: add libtinfow check
It seems some systems differentiate between tinfo and tinfow. And it
seems that mix ncursesw and tinfo (wide vs. non-wide char) is problem
for the systems.
Note that for example Fedora have ncursesw as well as ncurses, but
only one tinfo library. So, we need fallback this scenario.
Reported-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index c534b49f2..73cf22168 100644 --- a/configure.ac +++ b/configure.ac @@ -905,27 +905,21 @@ AC_ARG_WITH([tinfo], AS_HELP_STRING([--without-tinfo], [compile without libtinfo [], [with_tinfo=auto] ) have_tinfo=no +have_tinfow=no AS_IF([test "x$with_tinfo" != xno], [ - dnl Try pkg-config for libtinfo - PKG_CHECK_MODULES(TINFO, [tinfo], [ - dnl pkg-config success - have_tinfo=yes - UL_PKG_STATIC([TINFO_LIBS_STATIC], [tinfo])], [ - - dnl If pkg-config failed, fall back to classic searching. - AC_CHECK_LIB([tinfo], [tgetent], [ - have_tinfo=yes - TINFO_LIBS="-ltinfo" - TINFO_LIBS_STATIC="-ltinfo" - TINFO_CFLAGS=""]) + AS_IF([test "x$have_ncursesw" = xyes], [ + UL_TINFO_CHECK([tinfow]) + ]) + AS_IF([test "x$have_tinfow" = xno], [ + UL_TINFO_CHECK([tinfo]) ]) ]) AC_SUBST([TINFO_LIBS]) AC_SUBST([TINFO_LIBS_STATIC]) AC_SUBST([TINFO_CFLAGS]) -AM_CONDITIONAL([HAVE_TINFO], [test "x$have_tinfo" = xyes]) -AS_IF([test "x$have_tinfo" = xyes], [ - AC_DEFINE(HAVE_LIBTINFO, 1, [Define if libtinfo available.]) +AM_CONDITIONAL([HAVE_TINFO], [test "x$have_tinfo" = xyes -o "x$have_tinfow" = xyes]) +AS_IF([test "x$have_tinfo" = xyes -o "x$have_tinfow" = xyes], [ + AC_DEFINE(HAVE_LIBTINFO, 1, [Define if libtinfo or libtinfow available.]) ]) |