This caused me a bit of grief, so I thought I’d share the solution that worked for me (run from the sqlcipher code folder):
brew install openssl
BREW_OPENSSL_PATH=`ls -d '/usr/local/Cellar/openssl@3/'*`
./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -L$BREW_OPENSSL_PATH/lib/ -I$BREW_OPENSSL_PATH/include" LDFLAGS="$BREW_OPENSSL_PATH/lib/libcrypto.a"
make
You should be able to figure out the rest from there.