title: ZeroMQ doesn't spot libsodium
body: <p>I'm hoping to get the CurveCP functionality working within ZeroMQ ØMQ.  I'm using CentOS as the underlying OS.  </p>
  
  <p>After downloading and running ZeroMQ, I've done the usual <code>./configure</code>, <code>make</code> and <code>sudo make install</code>.  Then running <code>make check</code> returned many test passes, but stated:</p>
  
  <pre><code> libsodium not installed, skipping CURVE test
  </code></pre>
  
  <p>So <code>sudo yum install libsodium</code> and <code>sudo ldconfig</code>, then <code>make clean</code>, and the commands above.  But next time I ran the <code>make check</code>, the CURVE test is skipped, again reporting no libsodium.</p>
  
  <p>Looking at the tests, I see <code>test_security_curve.cpp</code> has <code>#ifndef HAVE_LIBSODIUM</code> and that preprocessor definition appears to be driving the 'no libsodium' skip.  </p>
  
  <p><code>./configure --with-libsodium</code> as per <a href="https://github.com/zeromq/libzmq/issues/912">this page</a> reports <code>libsodium is not installed</code></p>
  
  <p><code>./configure --with-libsodium=/home/eng/work/libsodium-master  --with-libsodium-include-dir=/home/eng/work/libsodium-master/src/libsodium/include --with-libsodium-lib-dir=/usr/lib64</code> reports <code>libsodium is not installed</code>.</p>
  
  <p><strong>Solution</strong></p>
  
  <p>In order to get this working, installing libsodium via YUM did not give a version of libsodium viable for a zeromq build.  It needed a real build of libsodium, which in turn required a recent copy of autoconf. </p>
  
  <pre><code>curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz
  tar xzf autoconf-2.69.tar.gz
  cd autoconf-2.69
  ./configure --prefix=/usr/local
  make
  sudo make install
  sudo ldconfig  
  cd ../libsodium-master
  ./autogen.sh
  ./configure
  make 
  sudo make install
  cd ../libzmq-master
  sudo ./configure --with-libsodium=/home/eng/work/libsodium-master  --with-libsodium-include-dir=/home/eng/work/libsodium-master/src/libsodium/include --with-libsodium-lib-dir=/usr/lib64
  sudo make
  make check  
  sudo make install
  </code></pre>