I'd like to know where -ltermcap is being "found" on macOS (Monterey) (aka "libtermcap.").
I know it's there, somewhere, because this fails to link:
cc ../stepit/stepit.o ../readline/libreadline.a testit.o -o testit
Undefined symbols for architecture x86_64:
"_tputs", referenced from:
__rl_backspace in libreadline.a(terminal.o)
__rl_cr in libreadline.a(terminal.o)
_rl_ding in libreadline.a(terminal.o)
__rl_standout_on in libreadline.a(terminal.o)
__rl_standout_off in libreadline.a(terminal.o)
__rl_enable_meta_key in libreadline.a(terminal.o)
__rl_disable_meta_key in libreadline.a(terminal.o)
...
and if I add "-ltermcap", it links (and runs) fine.
Note: I've done "find / -print > allfiles", then "grep libtermcap allfiles" ... no hits.
I've also searched for just "termcap" and (after excluding 'man' pages) found:
3,476 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/termcap.h
18 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libtermcap.tbd
3,476 /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/termcap.h
18 /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib/libtermcap.tbd
3,477 /usr/local/Cellar/ncurses/6.4/include/ncursesw/termcap.h
18 /usr/local/Cellar/ncurses/6.4/include/termcap.h
14,824 /usr/local/Cellar/ncurses/6.4/share/man/man3/curs_termcap.3x
20,106 /usr/local/Cellar/ncurses/6.4/test/demo_termcap.c
7,774 /usr/local/Cellar/ncurses/6.4/test/dots_termcap.c
168,016 /usr/lib/zsh/5.8.1/zsh/termcap.so
...nothing like a libtermcap (yeah, the one under .../zsh/... could be, but nothing is point to it / referring to it)
Yes, there are some termcap related files under "Cellar" ... I used brew to install ncurses, but there appears to be no library (or any compiled form) of ncurses there. (Nor do any of my 'env' variables refer to brew or Cellar.)
I'm really puzzled. Monterey (and a few releases prior) sure made it harder to find things : (
Why do I care?
I have a utility that creates a Makefile for me, and I want to have it check if libtermcap exists on a platform (so I can emit the proper -D flags for some programs that conditionally compile/use routines in libtermcap). (I compile/run on multiple machines running macOS, Linux, Windows, and HP-UX ... not all machines have libtermcap.)
thanks!