Subject: pkg/28925: tnftp's configure script doesn't warn if it can't find ncurses/termcap/etc. to link against
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <dhgutteridge@sympatico.ca>
List: pkgsrc-bugs
Date: 01/10/2005 04:15:01
>Number:         28925
>Category:       pkg
>Synopsis:       tnftp's configure script doesn't warn if it can't find ncurses/termcap/etc. to link against
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 10 04:15:01 +0000 2005
>Originator:     David H. Gutteridge
>Release:        Various
>Organization:
>Environment:
>Description:
The configure script for tnftp doesn't warn if it can't find ncurses/termcap/etc. to link against, causing compiles to fail during linking.  I've submitted a proposed patch to configure.in to fix this.  (I previously submitted this back in May under pkgsrc, I've realized I filed it incorrectly.)
>How-To-Repeat:
Compile tnftp from pkgsrc (via bootstrap or on its own) on a machine that doesn't have a relevant ncurses/termcap/etc. linker name symlink available, e.g. Debian Linux, which provides linker names only when pertinent library development packages are installed.
>Fix:
--- configure.in.orig	Sun Jan  9 19:32:17 2005
+++ configure.in	Sun Jan  9 20:02:47 2005
@@ -39,10 +39,9 @@
 dnl
 AC_CHECK_LIB(util, fparseln)
 if test $opt_editcomplete = yes; then
-	AC_CHECK_LIB(tinfo, tgetent, ,
-	    AC_CHECK_LIB(termcap, tgetent, ,
-	    AC_CHECK_LIB(curses, tgetent, ,  
-	    AC_CHECK_LIB(ncurses, tgetent))))
+	AC_SEARCH_LIBS(tgetent, [termcap termlib curses ncurses tinfo], ,[\
+		echo "No relevant curses library was found to link against.  "\
+		"Please install termcap or ncurses or similar library."; exit])
 	AC_SEARCH_LIBS(el_init, edit, have_libedit=yes, have_libedit=no)
 fi
 AC_LIBRARY_NET