Skip to content

Commit d23054b

Browse files
haampiebgoglin
authored andcommitted
Look for libtinfo too when detecting ncurses.
When ncurses is compiled with --with-termlib, the tparm function lives in libtinfo. Some distro's seem to provide both libncurses and libtinfo, where libncurses is just a linker script to actually link against libtinfo: $ docker run ubuntu:18.04 /bin/bash -c '\ apt-get update -qq &> /dev/null && \ apt-get install -qq libncurses5-dev &> /dev/null \ && cat /usr/lib/x86_64-linux-gnu/libcurses.so' INPUT(libncurses.so.5 -ltinfo) but it is better to look for tinfo ourselves in case this is missing. For reference, see LLVM's detection of ncurses: https://github.com/llvm/llvm-project/blob/3812919dc0588eeb74d440d3e3d8b1a097756f95/llvm/cmake/config-ix.cmake#L119 Signed-off-by: Harmen Stoppels <[email protected]>
1 parent f1fda3d commit d23054b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/hwloc_internal.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ EOF
321321
chosen_curses=""
322322
for curses in ncurses curses
323323
do
324-
for lib in "" -ltermcap -l${curses}w -l$curses
324+
for lib in "" -ltermcap -l${curses}w -l$curses -ltinfo
325325
do
326326
AC_MSG_CHECKING(termcap support using $curses and $lib)
327327
LIBS="$hwloc_old_LIBS $lib"

0 commit comments

Comments
 (0)