mutt on macOS and --with-curses=DIR

Dennis Preiser <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <[email protected]>
Hi there,

I use mutt on macOS. For software that I install only for me, I use
--prefix=$HOME/sw.

macOS comes with a relatively old version of ncurses. The header files
in the system-wide include directory look like this:

include/curses.h
include/ncurses.h -> curses.h

To be able to use a more recent version of ncurses, I installed one in
$HOME/sw. The header files are located in a directory named ncursesw
under $HOME/sw/include (ncursesw default) and look like this:

include/ncursesw/curses.h
include/ncursesw/ncurses.h -> curses.h

Among others, I use the following configure options:

--prefix=$HOME/sw --with-curses=$HOME/sw

Unfortunately, configure doesn't seem to be able to find ncurses in
$HOME/sw. It finds the system-wide ncurses library instead, and later
mutt is linked against that one.

% grep CURSES config.h
/* #undef HAVE_NCURSESW_NCURSES_H */
#define HAVE_NCURSES_H 1
/* #undef HAVE_NCURSES_NCURSES_H */
/* #undef USE_SLANG_CURSES */

(otool on macOS is like ldd)

% otool -L $HOME/sw/bin/mutt | grep curses
	/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)

This works with other apps like tin, lynx, or vifm; ncurses is found in
$HOME/sw, and the executables are linked against it.

% otool -L $HOME/sw/bin/vifm | grep curses
	/Users/dennis/sw/lib/libncursesw.6.dylib (compatibility version 6.0.0, current version 6.0.0)

It looks like --with-ncurses=DIR is being ignored for some reason, or at
least isn't having the desired effect.

If it helps, I can send the config.log; it's about 1 MiB in size.

Dennis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.