This post describes how to build the Paho MQTT library on Mac OS X with MacPorts openssl.
Prepare your system
Install the compiler
You need Xcode or the Xcode command line utils. If you're not sure if they are already installed open a terminal and try to run the gcc …