Fix building against ncurses with separate tinfo (termcap) library

The linker fails to resolve some symbols when libtinfo is installed as a
separate termcap library.

Fix this by checking a prominent symbol in the wide and non-wide cases.
This commit is contained in:
Jeroen Roovers 2020-06-10 13:10:55 +02:00 committed by Kaian
parent 1789d262c0
commit 2bdec5294d
1 changed files with 8 additions and 0 deletions

View File

@ -74,6 +74,10 @@ AS_IF([test "x$enable_unicode" == "xyes"], [
AC_CHECK_LIB([menuw], [new_item], [], [
AC_MSG_ERROR([ You need to have ncurses menuw library installed to compile sngrep.])
])
AC_SEARCH_LIBS([keyname], [tinfow], [], [
AC_MSG_ERROR([ You need to have ncurses tinfow library installed to compile sngrep.])
])
], [
# Ncurses without wide-character support
@ -96,6 +100,10 @@ AS_IF([test "x$enable_unicode" == "xyes"], [
AC_CHECK_LIB([menu], [new_item], [], [
AC_MSG_ERROR([ You need to have ncurses menu library installed to compile sngrep.])
])
AC_SEARCH_LIBS([keyname], [tinfo], [], [
AC_MSG_ERROR([ You need to have ncurses tinfo library installed to compile sngrep.])
])
])
####