[Git][NTPsec/ntpsec][master] Fixup libcrypto check area so it checks for headers

Hal Murray gitlab at mg.gitlab.com
Tue Dec 18 07:40:25 UTC 2018


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
9cdd3bc7 by Hal Murray at 2018-12-18T07:39:29Z
Fixup libcrypto check area so it checks for headers

The idea was to explicit check for the required headers in order to
give a saner error message if they were missing.  That didn't happen
if pkg-config worked.

- - - - -


1 changed file:

- wscript


Changes:

=====================================
wscript
=====================================
@@ -601,21 +601,22 @@ int main(int argc, char **argv) {
         msg="Checking for OpenSSL (via pkg-config)",
         define_name='', mandatory=False,
     ):
-        # Very old versions of OpenSSL don't have cmac support.
-        # This gives a sane(er) error message.
-        # It would be possible to make CMAC support optional by adding
-        # appropriate #ifdefs to the code.
-        openssl_headers = (
-            "openssl/evp.h",
-            "openssl/cmac.h",
-            "openssl/objects.h",
-            "openssl/rand.h",
-        )
-        for hdr in openssl_headers:
-            ctx.check_cc(header_name=hdr, includes=ctx.env.PLATFORM_INCLUDES)
-        # FIXME! Ignoring the result...
         ctx.check_cc(msg="Checking for OpenSSL's crypto library",
-                     lib="crypto")
+                     lib="crypto", mandatory=True)
+    # Very old versions of OpenSSL don't have cmac support.
+    # This gives a sane(er) error message.
+    # It would be possible to make CMAC support optional by adding
+    # appropriate #ifdefs to the code.
+    openssl_headers = (
+        "openssl/evp.h",
+        "openssl/cmac.h",
+        "openssl/objects.h",
+        "openssl/md5.h",
+        "openssl/rand.h",
+    )
+    for hdr in openssl_headers:
+        ctx.check_cc(header_name=hdr, mandatory=True,
+            includes=ctx.env.PLATFORM_INCLUDES)
 
     # Optional functions.  Do all function checks here, otherwise
     # we're likely to duplicate them.



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/9cdd3bc751bf520d6445513d73ab2627f68f252f

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/9cdd3bc751bf520d6445513d73ab2627f68f252f
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20181218/095f2f03/attachment-0001.html>


More information about the vc mailing list