Skip to content

Commit

Permalink
Fallback to ncurses library for tgetent
Browse files Browse the repository at this point in the history
This fixes the configure phase in NetBSD, which doesn't have a separate
tinfo library in base.

Issue #1118
  • Loading branch information
gahr committed Mar 31, 2018
1 parent 8e21e12 commit f4e8772
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions auto.def
Original file line number Diff line number Diff line change
Expand Up @@ -474,17 +474,20 @@ switch [opt-val with-ui ncurses] {

cc-with [list -libs -L$ncurses_prefix/lib] {

set tinfo_libs {tinfow tinfo}
set ncurses_libs {ncursesw ncurses curses}

# Locate the library defining tgetent()
# This must be done *before* checking for ncurses functions, see
# https://github.com/neomutt/neomutt/issues/1118
foreach tinfo_lib {tinfow tinfo} {
foreach tinfo_lib [concat $tinfo_libs $ncurses_libs] {
if {[cc-check-function-in-lib tgetent $tinfo_lib]} {
break
}
}

# Locate the library defining waddnwstr()
foreach ncurses_lib {ncursesw ncurses curses} {
foreach ncurses_lib $ncurses_libs {
if {[cc-check-function-in-lib waddnwstr $ncurses_lib]} {
break
}
Expand Down

0 comments on commit f4e8772

Please sign in to comment.