Nsd and own openssl

Hi,

currently I try to compile openssl-1.1.x as own package for my usual platforms.
Viktor Dukhovni suggested a way this build can coexist without symbol conflict with
the real OpenSSL in /usr

So my includes are now also in /usr/include/openssl but the libraries are named
/usr/lib/libcrypto-opt.so.1.1 and /usr/lib/libssl-opt.so.1.1

That work for other projects like postfix or nginx.
But it fail for nsd. Configure tries to check some stuff and uses "libssl" and "libcrypto" as fixed names.
- checking if libssl needs libdl
- checking if libcrypto needs -pthread
- checking for HMAC_Update in -lcrypto

Can I tell configure to use my libraries?

Andreas

As far as I can see nsd don't use pkg-config to find the names of the ssl libraries.
There are some places in ./configure, that use "-lssl" and "-lcrypto"
`pkg-config --libs libssl|libcrypto` would return the local values

The attached patch to configure let nsd-4.1.13rc1 build with my openssl-1.1.x.
worth to mention: no single compiler warning notices while building with openssl-1.1.x!
good job!

Andreas

(attachments)

use_pkg-config.patch (1.7 KB)

JFTR As openssl 1.1.0 has a different SOVERSION, it would not clash with
system OpenSSL (that would probably stay on 1.0.x for a while). So
uninstalling -dev headers for system openssl and installing OpenSSL
1.1.0 into /usr/local (or even using backported package to install
libopenssl-dev 1.1.0 into /usr) would just work[*].

* - Depends on the system used and the packaging crazyness it uses (100%
for Debian/Ubuntu, can't say for sure for other systems)

Cheers,