~registry/kmod/master

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Lucas De Marchi
  • Author(s): Michal Suchanek
  • Date: 2023-10-17 17:27:59 UTC
  • Revision ID: git-v1:1bb23d7f19d888fbdd96ae0fe929b7086713ef33
configure: Detect openssl sm3 support

Older openssl versions do not support sm3. The code has an option to
disable the sm3 hash but the lack of openssl support is not detected
automatically.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Link: https://lore.kernel.org/r/b97e20faa07e9e31c6eaf96683011aa24e80760c.1689681454.git.msuchanek@suse.de
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
AS_IF([test "x$with_openssl" != "xno"], [
124
124
        PKG_CHECK_MODULES([libcrypto], [libcrypto >= 1.1.0], [LIBS="$LIBS $libcrypto_LIBS"])
125
125
        AC_DEFINE([ENABLE_OPENSSL], [1], [Enable openssl for modinfo.])
 
126
        AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <openssl/ssl.h>
 
127
                int nid = NID_sm3;]])], [
 
128
                AC_MSG_NOTICE([openssl supports sm3])
 
129
        ], [
 
130
                AC_MSG_NOTICE([openssl sm3 support not detected])
 
131
                CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_SM3"
 
132
        ])
126
133
], [
127
134
        AC_MSG_NOTICE([openssl support not requested])
128
135
])