]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix linking order for OpenSSL libraries
authorMark Andrews <marka@isc.org>
Fri, 22 Jan 2021 04:59:03 +0000 (15:59 +1100)
committerMark Andrews <marka@isc.org>
Tue, 16 Feb 2021 22:54:03 +0000 (22:54 +0000)
As libssl depends on libcrypto, -lssl needs to precede -lcrypto in
linker invocations or else the build will fail with static OpenSSL
libraries.  Adjust m4/ax_check_openssl.m4 to prevent this issue from
getting triggered when pkg-config files for OpenSSL are not available.

m4/ax_check_openssl.m4

index 19d0c2d176b026f12db4d6a0f6cab93b83da4bb8..a3faba0a45a9a8d2e3089be9d7acf6f7b9a5b949 100644 (file)
@@ -68,7 +68,7 @@ AC_DEFUN([AX_CHECK_OPENSSL], [
            AS_IF([test -f "$ssldir/include/openssl/ssl.h"],
                [
                    OPENSSL_CFLAGS="-I$ssldir/include"
-                    OPENSSL_LIBS="-L$ssldir/lib -lcrypto -lssl"
+                    OPENSSL_LIBS="-L$ssldir/lib -lssl -lcrypto"
                     found=true
                     AC_MSG_RESULT([yes])
                     break