On Fri, Apr 03, 2026 at 10:01:57AM +0200, Dennis Preiser wrote:
On Fri, Apr 03, 2026 at 10:36:59AM +0800, Kevin J. McCarthy wrote:
On Thu, Apr 02, 2026 at 07:51:44PM +0200, Dennis Preiser wrote:
> 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.

So, to be clear, you don't see -I$HOME/sw/include in the various gcc lines
during compilation and you don't see -L$HOME/sw/lib in the final mutt
compilation line?

No, I see it - it's there. My $HOME is /Users/dennis and it appears in
every Makefile after configure in the CPPFLAGS and LDFLAGS variables, so
it's also included in the calls to clang (no gcc here).

[...]

The system-wide library here is libncurses, but the library in $HOME/sw
is libncursesw. I think it should therefore be -lncursesw in MUTTLIBS.

Ahh... I see. It turns out the configure.ac is checking for ncurses first, and then ncursesw:

        for lib in ncurses ncursesw
        do
                AC_CHECK_LIB($lib, waddnwstr, [cf_ncurses="$lib"; break])
        done

So it's finding the system "ncurses", and then saying 'okay I'm good'.

If you don't mind, would you try compiling from the git 'stable' branch, but changing the check above on line 336 to reverse the order:

        for lib in ncursesw ncurses
        do
                AC_CHECK_LIB($lib, waddnwstr, [cf_ncurses="$lib"; break])
        done

You'll need to have autoconf and those utils installed though, and use the 'prepare' script in place of you configure invocation... If that's not feasible, let me know and I'll regen configure and email it to you directly.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to