]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix NetBSD build with and without ncurses
authorValtteri Vuorikoski <vuori@notcom.org>
Thu, 13 Jul 2023 09:35:51 +0000 (12:35 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 15 Jul 2023 08:10:03 +0000 (11:10 +0300)
* configure.ac (netbsd): Don't set TERMINFO=no unless the termcap
library is either -ltermcap or -lcurses.  This prevents aborts
because on recent versions of NetBSD libtermcap is actually a
symlink to libterminfo. (Bug#64577)

Copyright-paperwork-exempt: yes

configure.ac

index 19575e80cf4214e15e8b03fdaba7eabac49d99e7..df74f8cd2f80e9a32fcb3554d590b13c99fcaeb7 100644 (file)
@@ -5212,7 +5212,11 @@ fail;
     ;;
 
   netbsd)
-    if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
+    # NetBSD versions prior to 6.0 lack native terminfo, but have a
+    # tputs() built on top of termcap in these libraries. Use native
+    # termcap instead in this case. NetBSD >= 6.0 has native terminfo
+    # implementation in -lterminfo.
+    if test "x$LIBS_TERMCAP" = "x-ltermcap" -o "x$LIBS_TERMCAP" = "x-lcurses"; then
       TERMINFO=no
       LIBS_TERMCAP="-ltermcap"
     fi