Note that this is documented in the INSTALL guide.
For macOS users, Frotz with all three of its user interfaces should compile without any changes to the source code or Makefiles. If you install Xcode from the Mac App Store, you should be able to run “make nosound” to build Frotz. To enable sound support, you can use Homebrew https://brew.sh/ to install the sound support libraries: “brew install libao libmodplug libsamplerate libsndfile libvorbis ncurses” Once the sound libraries are installed, a simple “make” should build Frotz. The ncurses that comes with macOS should not be used as it is extremely old and does not support italic characters. If you insist on using it, make sure you comment out the line in the Makefile that reads “ITALIC ?= yes”.
… but this paragraph seems to contradict itself. You can’t even make nosound to build Frotz if you don’t upgrade ncurses. (ncurses is not a “sound library.”)
EDIT: And the documentation is not even true. I just ran brew install ncurses and make nosound on my machine running macOS Monterey 12.3, but it failed to compile with the same A_ITALIC error.
I note that on my M1 (ARM) Mac running macOS 12.3 Monterey, I can’t get a full sound-enabled build. Even when I brew install libao libmodplug libsamplerate libsndfile libvorbis ncurses && make clean && make ITALIC=. I get:
ux_audio.c:55:10: fatal error: 'ao/ao.h' file not found
But this doesn’t appear to be a regression from 2.53 (or 2.52, even, which I know I was able to build locally on my x86_64 Mac).
I am able to run make clean && make ITALIC= nosound. But when I make ITALIC= sfrotz, that fails with this error:
sf_ftype.c:31:10: fatal error: 'freetype2/freetype/freetype.h' file not found
… even though I already ran brew install freetype2
I moved and expanded the macOS build info to correct the mistake of listing ncurses as a sound library and be more verbose about using Brew. Could I get someone with a Mac to check things out?
+1, when I brew install ncurses and then make clean && make nosound it crashes with that same error, on macOS 12 Monterey on both ARM and x86_64.
I’ve filed a merge request that seems to fix the macOS build, by assuming that on macOS you either want to use the Homebrew version of ncurses or you want to manually set CURSES_CONFIG=ncurses5.4-config ITALIC=.
I also fixed the SDL build there by “fixing” an #include path.
When 2.54 is released, somebody (maybe me? maybe not?) should remove ITALIC= from the Homebrew formula and configure the formula to depend on Homebrew’s own installation of ncurses.
I did some more checking on ncurses and determined that italic support first appeared in the commit dated 20130831. The first release with this capability was 6.0. So, I was wrong about Apple’s version misidentifying what it can and can’t do. Therefore I think I can add some ifdefs to automatically disable italics if < 6.0 is detected.
I added a simple compile-time check to see if version 6.0 or later of ncurses is being used. If so, the curses interface will use italics. If not, it’ll use underline just as it would if ITALIC_SUPPORT was not defined. Please check. Hopefully this will be the end of macOS ncurses troubles. Nonetheless, I would recommend using Homebrew’s ncurses just because.
Works out of the box. Tag it and call it 2.54! (And then somebody gets to update the Homebrew formula…)
BTW, is SDL sfrotz supposed to support italics? (It doesn’t on the latest master commit 9c4f56071. Italicized text is just underlined. I think that’s not a regression, though…?)
sfrotz has never supported italic. I’m going through the source now to figure out how to implement it.
[UPDATE]
It looks like implementing italic for the SDL interface is more than a trivial effort. Therefore I’ll wrap things up for tagging 2.54 and slate italic for the next release.