On Mon Oct 29, 2001 at 09:08:40AM -0500, Thomas E. Dickey wrote:

> On Mon, 29 Oct 2001, Jonathan Perkin wrote:
> 
> > Aye, actually had time to investigate this over the weekend and found
> > the offending stuff in mutt's configure script - for the use_default_color
> > checks it only includes curses.h - now on NetBSD this only exists in
> > /usr/include for system curses library, and the ncurses 5 pkgsrc only
> > installs /usr/pkg/include/ncurses.h with no symlink back to curses.h
> >
> > I'm no automake/autoconf expert, so is this a mutt issue where the
> > configure script should be modified to support NetBSD, or should the
> > NetBSD pkgsrc DTRT and symlink /usr/pkg/include/curses.h -> ncurses.h ?
> 
> I think the configure script should be modified - not just NetBSD support.
> But it does get complicated.  The script that I wrote for lynx defaults
> to "curses" (which in this case would pick up the NetBSD curses), and
> allows "ncurses" as an option.  Mutt's configure script tries to find
> ncurses, but may be relying on a bias toward ncurses rather than making
> it explicitly an option.

I think it should at least look for "ncurses.h" in the path specified by
--with-curses= before "curses.h"

I dunno, something like:

--- configure.in.orig   Mon Oct 29 14:36:52 2001
+++ configure.in        Mon Oct 29 14:36:34 2001
@@ -195,7 +195,11 @@
 
         old_LIBS="$LIBS"
         LIBS="$LIBS $MUTTLIBS"
-        CF_CHECK_FUNCDECLS([#include <curses.h>], start_color typeahead bkgdset 
curs_set meta use_default_colors resizeterm)
+       if test x$mutt_cv_curses != x; then
+                       CF_CHECK_FUNCDECLS([#include <ncurses.h>], start_color 
+typeahead bkgdset curs_set meta use_default_colors resizeterm)
+       else
+               CF_CHECK_FUNCDECLS([#include <curses.h>], start_color typeahead 
+bkgdset curs_set meta use_default_colors resizeterm)
+       fi
         if test "$ac_cv_func_decl_start_color" = yes; then
                 AC_DEFINE(HAVE_COLOR)
         fi

? (Disclaimer: I don't do automake :)

Doing an include based on AC_CHECK_HEADERS would obviously be nicer, but I
couldn't see a way of doing that.

if used --with-curses=DIR
        if exists DIR/ncurses.h
                #include <ncurses.h>
        else
                #include <curses.h>
        fi
fi

Jon

Reply via email to