For various reasons that will be of interest to no-one, I need to compile at least a minimal upsmon (and hopefully upsc) as a static binary.  Unfortunately, the ./configure options that purport to do this, don&#39;t have any effect on the resulting binary.  Either with the latest (2.4.1), or older versions of NUT.<br>
<br>CFLAGS=&quot;-static&quot; ./configure --enable-static  --disable-shared --without-usb --without-serial --without-ssl --without-wrap --with-drivers=&quot;&quot;  &amp;&amp; gmake<br><br>Above configure line works without complaint, however the binaries are dynamically linked:<br>
<br>nut-2.4.1$ ldd clients/upsmon<br>clients/upsmon needs:<br>        /usr/lib/libsocket.so.2<br>        /usr/lib/libc.so.1<br><br>I&#39;ve had no such problems creating static binaries from far more complex bits of software (like OpenSSH) on the same system(s).<br>
<br>I could provide more system information, but I&#39;m confident it won&#39;t be helpful.  I have the same problem on several different system, with vastly varied configurations.  <br><br>I expect there&#39;s some libtool / gcc linking flag I&#39;m ignorant of, or neglecting to use, but extensive trial and error has not found it.  [-Xlinker] -all-static , -without-shared, -static-libtool-libs, etc. have not had any effect on the end binary.<br>
<br>Any tips are welcome.<br>