$NetBSD: patch-aj,v 1.7 2008/09/01 17:53:47 christos Exp $

--- configure.ac.orig	2008-04-17 20:54:16.000000000 +0300
+++ configure.ac	2008-09-01 19:43:58.000000000 +0300
@@ -130,7 +130,7 @@
 # rather ncurses.  So we check for it.
 TERMLIBS=
 # Check for termlib before termcap because Solaris termcap needs libucb.
-TERMLIB_VARIANTS="ncurses curses termlib termcap terminfo"
+TERMLIB_VARIANTS="curses termlib termcap terminfo ncurses"
 for termlib in ${TERMLIB_VARIANTS}; do
   AC_CHECK_LIB(${termlib}, tgetent,
      [TERMLIBS="${TERMLIBS} -l${termlib}"; break])
