commit 0e159d522bec54bba99c14edad51d9c450f60aa1 parent 745342f3cc055001765a625cea8065edc4b57fa7 Author: hhvn <dev@hhvn.uk> Date: Sun, 23 Jan 2022 00:29:32 +0000 configure: always link libtinfow if present Diffstat:
M | configure | | | 25 | ++++++------------------- |
1 file changed, 6 insertions(+), 19 deletions(-)
diff --git a/configure b/configure @@ -32,27 +32,14 @@ cat > test.c <<- EOF EOF ${CC} -ltinfow -o test test.c >/dev/null 2>/dev/null && { printf '%s\n' "yes" - hastinfow=1 + cat >> config.mk <<- EOF + # linking with tinfow + # on some systems both ncursesw and tinfow must be linked + # otherwise, thank ncurses for the nondescript segfault in initscr()... + LDFLAGS += -ltinfow + EOF } || { printf '%s\n' "no" - hastinfow=0 -} - -[ $hastinfow -eq 1 ] && { - printf '%s' "should link with libtinfow... " - cat > test.c <<- EOF - #include <ncurses.h> - int main(void) { initscr(); endwin(); return 0; } - EOF - ${CC} -ltinfow -o test test.c >/dev/null 2>/dev/null && ./test >/dev/null 2>/dev/null && { - printf '%s\n' "yes" - cat >> config.mk <<- EOF - # linking with tinfow - # on some systems both ncursesw and tinfow must be linked - # otherwise, thank ncurses for the nondescript segfault in initscr()... - LDFLAGS += -ltinfow - EOF - } || printf '%s\n' "no" } printf '%s' "checking for strlcpy... "