You can use
env PKG_CONFIG_PATH=/opt/homebrew/lib/ ./configure …
Aki
First, need to install pkg-config using Homebrew.
Then install libsodium from Homebrew.
Then:
env PKG_CONFIG_PATH=/opt/homebrew/lib/pkgconfig pkg-config --libs libsodium
CPPFLAGS=-I/opt/homebrew/Cellar/openssl@3/3.0.8/include LDFLAGS=-L/opt/homebrew/opt/openssl@3/lib ./configure --with-ssl=openssl --with-mysql --with-sodium
(Probably should have not linked to specific version of OpenSSL 3, but it works so I’m not changing it now!)
make
sudo make install
All should work, start Dovecot with
sudo /usr/local/sbin/dovecot
And test with:
% sudo doveadm pw -l
SHA1 SSHA512 SCRAM-SHA-256 BLF-CRYPT PLAIN HMAC-MD5 OTP SHA512 SHA DES-CRYPT CRYPT SSHA MD5-CRYPT PLAIN-MD4 PLAIN-MD5 SCRAM-SHA-1 CLEAR CLEARTEXT ARGON2I ARGON2ID SSHA256 MD5 PBKDF2 SHA256 CRAM-MD5 PLAIN-TRUNC SMD5 DIGEST-MD5 LDAP-MD5
Hope that saves someone some time and frustration.
Probably future me! :-)
Huge thanks to Aki for his help and patience,
James.