]> git.ipfire.org Git - thirdparty/kmod.git/blobdiff - configure.ac
configure: Detect openssl sm3 support
[thirdparty/kmod.git] / configure.ac
index 82a853289a83f017278283e949cf645728c9ecae..e5bceeaa1722d6c42c008a2cef67d0eaa8e48530 100644 (file)
@@ -123,6 +123,13 @@ AC_ARG_WITH([openssl],
 AS_IF([test "x$with_openssl" != "xno"], [
        PKG_CHECK_MODULES([libcrypto], [libcrypto >= 1.1.0], [LIBS="$LIBS $libcrypto_LIBS"])
        AC_DEFINE([ENABLE_OPENSSL], [1], [Enable openssl for modinfo.])
+       AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <openssl/ssl.h>
+               int nid = NID_sm3;]])], [
+               AC_MSG_NOTICE([openssl supports sm3])
+       ], [
+               AC_MSG_NOTICE([openssl sm3 support not detected])
+               CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_SM3"
+       ])
 ], [
        AC_MSG_NOTICE([openssl support not requested])
 ])