3 Mac Homebrew
Tom Russo edited this page 2026-01-10 12:06:30 -07:00

Installing Xastir on Macintosh with Homebrew

Macs don't have a built-in package management system. You have to install an add-on.

This page is being written by a non-Mac user, cribbing off of what was done in our Github Actions automated testing script.

Getting dependent libraries

  • Install homebrew
  • Install XQuartz: brew install xquartz --cask
  • Install required libraries: brew install autoconf automake libtool berkeley-db graphicsmagick libgeotiff openmotif pcre proj shapelib cjson git

Configuring Xastir

Homebrew installs all of these packages in a place where the compiler won't look without help. You have to give configure extra arguments to make it work.

/path/to/configure CPPFLAGS="-I/usr/include/geotiff -I/opt/homebrew/include -I/opt/homebrew/opt/berkeley-db/include" "LDFLAGS=-L/opt/homebrew/lib -L/opt/homebrew/opt/berkeley-db/lib"

Everything else is per the general building guidance

The remaining steps of building Xastir are exactly as provided in Installing Xastir.

How were these instructions tested?

The Xastir team has an automated testing setup on Github that checks the Xastir build on several different systems. Mac OS is one of them. This process launches a vanilla Mac OS virtual machine with Homebrew, executes the brew install commands above, then configures and builds Xastir from source.

This process is run every time any change is made to the Xastir code.

We also check it by hand

One of the Xastir developers uses Mac as his primary development platform, and these instructions were created by that developer to document how he did it.