Re: mutt on macOS and --with-curses=DIR

Dennis Preiser <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <[email protected]>
On Sun, Apr 12, 2026 at 03:38:12PM +0800, Kevin J. McCarthy wrote:
> On Sun, Apr 12, 2026 at 01:16:48PM +0800, Kevin J. McCarthy wrote:
> > What is installed in your ~/sw/include and lib directory for ncurses,
> > and exactly where?
> 
> And the same for the system libraries.

Here's how I run 'configure' for ncurses and mutt.

ncurses:

dennis@coredump:~/src/ncurses-6.6-20260411% ./configure --prefix=${MY_PREFIX} --mandir=${MY_PREFIX}/share/man --with-shared --without-debug --enable-widec --disable-home-terminfo --enable-sigwinch --without-ada --disable-rpath --enable-colorfgbg --without-tests --with-pcre2 --with-pkg-config --enable-pc-files

(make && make install)

mutt:

dennis@coredump:~/src/mutt-2.3.1% ./configure --prefix=${HOME}/sw --with-curses=${HOME}/sw --with-ssl=${HOME}/sw --with-homespool --enable-smtp --enable-imap --disable-nls --disable-doc --with-ssl --with-sasl --enable-hcache --with-lmdb

(make && make install)

dennis@coredump:~/src/mutt-2.3.1% type mutt
mutt is /Users/dennis/sw/bin/mutt

As mentioned earlier, otool is similar to ldd.

dennis@coredump:~/src/mutt-2.3.1% otool -L mutt
mutt:
	/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
	/Users/dennis/sw/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.3.2)
	/Users/dennis/sw/lib/libssl.3.dylib (compatibility version 3.0.0, current version 3.0.0)
	/Users/dennis/sw/lib/libcrypto.3.dylib (compatibility version 3.0.0, current version 3.0.0)
	/usr/lib/libsasl2.2.dylib (compatibility version 3.0.0, current version 3.15.0)
	/Users/dennis/sw/lib/liblmdb.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1356.0.0)

In ~/sw/include/ is the directory 'ncursesw', and all the header files
are located there:

dennis@coredump:~% ls -l ~/sw/include/
total 584
drwxr-xr-x@ 168 dennis  staff    5376 Jul 21  2025 FL
-rw-r--r--@   1 dennis  staff    6332 Jul 15  2025 gsasl-mech.h
-rw-r--r--@   1 dennis  staff    2484 Jul 15  2025 gsasl-version.h
-rw-r--r--@   1 dennis  staff   18895 Jul 15  2025 gsasl.h
drwxr-xr-x   29 dennis  staff     928 Mar 22 10:47 libavcodec
drwxr-xr-x    5 dennis  staff     160 Mar 22 10:47 libavdevice
drwxr-xr-x    7 dennis  staff     224 Mar 22 10:47 libavfilter
drwxr-xr-x    6 dennis  staff     192 Mar 22 10:47 libavformat
drwxr-xr-x  103 dennis  staff    3296 Mar 22 10:47 libavutil
drwxr-xr-x    4 dennis  staff     128 Jan 12  2025 libcanlock-3
drwxr-xr-x@   9 dennis  staff     288 Jan 17 13:38 libexttextcat
drwxr-xr-x@   2 dennis  staff      64 Jan 17 13:40 libltdl
drwxr-xr-x    5 dennis  staff     160 Mar 22 10:47 libswresample
drwxr-xr-x    5 dennis  staff     160 Mar 22 10:47 libswscale
-rw-r--r--@   1 dennis  staff   74012 Mar 29 13:03 lmdb.h
drwxr-xr-x   20 dennis  staff     640 Apr 12 11:15 ncursesw
drwxr-xr-x  144 dennis  staff    4608 May 19  2025 openssl
-rw-r--r--@   1 dennis  staff   51918 Dec  2 14:59 pcre2.h
-rw-r--r--@   1 dennis  staff    7276 Dec  2 14:59 pcre2posix.h
drwxr-xr-x@   3 dennis  staff      96 Jan 11  2025 pkgconf
drwxr-xr-x@  83 dennis  staff    2656 Apr 11 17:28 python3.14
drwxr-xr-x  207 dennis  staff    6624 Mar 22 10:52 unicode
-rw-r--r--@   1 dennis  staff   16921 Mar 22 10:58 zconf.h
-rw-r--r--@   1 dennis  staff  103848 Mar 22 10:58 zlib.h

dennis@coredump:~% ls -l ~/sw/include/ncursesw
total 720
-rw-r--r--@ 1 dennis  staff  105332 Apr 12 11:15 curses.h
-rw-r--r--@ 1 dennis  staff    7234 Apr 12 11:15 cursesapp.h
-rw-r--r--@ 1 dennis  staff   28297 Apr 12 11:15 cursesf.h
-rw-r--r--@ 1 dennis  staff   20061 Apr 12 11:15 cursesm.h
-rw-r--r--@ 1 dennis  staff    8838 Apr 12 11:15 cursesp.h
-rw-r--r--@ 1 dennis  staff   50357 Apr 12 11:15 cursesw.h
-rw-r--r--@ 1 dennis  staff    7336 Apr 12 11:15 cursslk.h
-rw-r--r--@ 1 dennis  staff    2969 Apr 12 11:15 eti.h
-rw-r--r--@ 1 dennis  staff   10610 Apr 12 11:15 etip.h
-rw-r--r--@ 1 dennis  staff   18917 Apr 12 11:15 form.h
-rw-r--r--@ 1 dennis  staff   11893 Apr 12 11:15 menu.h
-rw-r--r--@ 1 dennis  staff    4183 Apr 12 11:15 ncurses_dll.h
lrwxr-xr-x@ 1 dennis  staff       8 Apr 12 11:15 ncurses.h -> curses.h
-rw-r--r--@ 1 dennis  staff    4521 Apr 12 11:15 panel.h
-rw-r--r--@ 1 dennis  staff    8703 Apr 12 11:15 term_entry.h
-rw-r--r--@ 1 dennis  staff   42222 Apr 12 11:15 term.h
-rw-r--r--@ 1 dennis  staff    3477 Apr 12 11:15 termcap.h
-rw-r--r--@ 1 dennis  staff    3223 Apr 12 11:15 unctrl.h

dennis@coredump:~% ls -l ~/sw/lib/*curses*
-rw-r--r--@ 1 dennis  staff  111536 Apr 12 11:15 /Users/dennis/sw/lib/libncurses++w.a
-rwxr-xr-x@ 1 dennis  staff  364096 Apr 12 11:15 /Users/dennis/sw/lib/libncursesw.6.dylib
-rw-r--r--@ 1 dennis  staff  642392 Apr 12 11:15 /Users/dennis/sw/lib/libncursesw.a
lrwxr-xr-x@ 1 dennis  staff      19 Apr 12 11:15 /Users/dennis/sw/lib/libncursesw.dylib -> libncursesw.6.dylib

'.dylib' is the macOS equivalent of '.so'.

The system-wide libraries and header files in macOS are located within
Xcode.app (Apple's development environment).

dennis@coredump:~% xcrun --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

The header files are located directly in usr/include, not in a
subdirectory.

dennis@coredump:.../Developer/SDKs/MacOSX.sdk% ls -l usr/include/(*curses|eti|form|menu|panel|term(\.|_|cap)|unc)*
-rw-r--r--@ 1 root  wheel  161910 Feb 22 00:00 usr/include/curses.h
-rw-r--r--  1 root  wheel    2891 Feb 22 00:00 usr/include/eti.h
-rw-r--r--  1 root  wheel   18265 Feb 22 00:00 usr/include/form.h
-rw-r--r--  1 root  wheel   11950 Feb 22 00:00 usr/include/menu.h
-rw-r--r--  1 root  wheel    4277 Feb 22 00:00 usr/include/ncurses_dll.h
lrwxr-xr-x  1 root  wheel       8 Mar 25 19:51 usr/include/ncurses.h -> curses.h
-rw-r--r--  1 root  wheel    1062 Feb 21 23:59 usr/include/ncurses.modulemap
-rw-r--r--  1 root  wheel    4062 Feb 22 00:00 usr/include/panel.h
-rw-r--r--  1 root  wheel    8145 Feb 22 00:00 usr/include/term_entry.h
-rw-r--r--  1 root  wheel   39957 Feb 22 00:00 usr/include/term.h
-rw-r--r--  1 root  wheel    3476 Feb 22 00:00 usr/include/termcap.h
-rw-r--r--  1 root  wheel    3099 Feb 22 00:00 usr/include/unctrl.h

dennis@coredump:.../Developer/SDKs/MacOSX.sdk% ls -l usr/lib/*curses*
lrwxr-xr-x  1 root  wheel     18 Mar 25 19:51 usr/lib/libcurses.tbd -> libncurses.5.4.tbd
-rw-r--r--  1 root  wheel  21256 Feb 21 23:58 usr/lib/libncurses.5.4.tbd
lrwxr-xr-x  1 root  wheel     18 Mar 25 19:51 usr/lib/libncurses.5.tbd -> libncurses.5.4.tbd
lrwxr-xr-x  1 root  wheel     18 Mar 25 19:51 usr/lib/libncurses.tbd -> libncurses.5.4.tbd

dennis@coredump:.../Developer/SDKs/MacOSX.sdk% grep libncurses usr/lib/libncurses.tbd
install-name:    '/usr/lib/libncurses.5.4.dylib'

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.