Hi,
I took the liberty of reworking the patch presented in http://www.stunnel.org/pipermail/stunnel-users/2010-July/002711.html to fix the issues raised in http://www.stunnel.org/pipermail/stunnel-users/2010-August/002719.html
The main reason why the substitution didn't work is because it should not be done during configure-time but inside the Makefile as described in the Autoconf manual http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html...
The patch is attached to this email or you can browse the patch at https://github.com/dago/stunnel/compare/master...sysconfdir
The patch is against 5.18b3 (is there a public repo available to make patches?)
It would be great if the change could be applied.
Best regards
-- Dago