diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 05:31:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 05:31:45 +0000 |
commit | 74aa0bc6779af38018a03fd2cf4419fe85917904 (patch) | |
tree | 9cb0681aac9a94a49c153d5823e7a55d1513d91f /src/external/crypto.m4 | |
parent | Initial commit. (diff) | |
download | sssd-74aa0bc6779af38018a03fd2cf4419fe85917904.tar.xz sssd-74aa0bc6779af38018a03fd2cf4419fe85917904.zip |
Adding upstream version 2.9.4.upstream/2.9.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/external/crypto.m4')
-rw-r--r-- | src/external/crypto.m4 | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/external/crypto.m4 b/src/external/crypto.m4 new file mode 100644 index 0000000..b21645d --- /dev/null +++ b/src/external/crypto.m4 @@ -0,0 +1,30 @@ +AC_DEFUN([AM_CHECK_LIBCRYPTO], + [PKG_CHECK_MODULES([CRYPTO],[libcrypto]) + PKG_CHECK_MODULES([SSL],[libssl]) +]) + +AC_MSG_CHECKING([whether OpenSSL's x400Address is ASN1_STRING]) +SAVE_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS -Werror -Wall -Wextra" +AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([ + #include <openssl/x509v3.h> + + int main(void) + { + GENERAL_NAME gn = { 0 }; + + return ASN1_STRING_length(gn.d.x400Address); + } + ])], + [ + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_X400ADDRESS_STRING], + [1], + [whether OpenSSL's x400Address is ASN1_STRING])], + [ + AC_MSG_RESULT([no]) + AC_MSG_WARN([OpenSSL's x400Address is not of ASN1_STRING type]) + ]) + +CFLAGS=$SAVE_CFLAGS |