title: Building libzmq with libsodium
body: <p>Edit as of ZMQ version 4.1:
  Configure automatically looks for libsodium, so this is no longer required. If for some reason you wish to build it WITHOUT libsodium and you have it built and installed, configure libzmq with '--without-libsodium'.</p>
  
  <hr>
  
  <p>So I'm having problems building/making zeromq with libsodium.</p>
  
  <p>im using msys2 as the shell - specifically the mingw32_shell - , and zmq 4.1.0 rc1 with libsodium 1.0.1 and mingw-w64 32bit (gcc 4.9.2).</p>
  
  <p>im currently able to compile libsodium like this</p>
  
  <pre><code>cd .../libsodium
  bash configure
  make
  make check
  make install
  </code></pre>
  
  <p>and everything is fine, all the tests pass and the libs and includes end up in the /usr/local/ folders that msys2 seems to know about.</p>
  
  <p>then when i try to build zeromq with these commands</p>
  
  <pre><code>cd .../zeromq
  bash configure --with-libsodium
  make
  make check
  make install
  </code></pre>
  
  <p>i never get past the configure stage, as configure returns </p>
  
  <pre><code>checking for sodium_init in -lsodium... no
  configure: error: libsodium is not installed.  Install it or don't pass --with-libsodium to configure script
  </code></pre>
  
  <p>i have tried the methods suggested in this post - <a href="https://stackoverflow.com/questions/23220464/zeromq-doesnt-spot-libsodium">ZeroMQ doesn&#39;t spot libsodium</a> - but to no success.</p>
  
  <p>therefore my question is thus: how do i either set the locations for zeromq's configure to look for libsodium to spot, whether with --with-libsodium, --with-libsodium-include-dir= and --with-libsodium-lib-dir=, or have them 'installed' in a location that msys2's shell is able to find?</p>