diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 21:11:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 21:11:59 +0000 |
commit | 3cd01b932e1c85394272ae64fae67ebeda92fb00 (patch) | |
tree | c5a3115d710afc1879ddea5349362a2bc651733c /m4/pdns_with_libssl.m4 | |
parent | Initial commit. (diff) | |
download | dnsdist-3cd01b932e1c85394272ae64fae67ebeda92fb00.tar.xz dnsdist-3cd01b932e1c85394272ae64fae67ebeda92fb00.zip |
Adding upstream version 1.8.3.upstream/1.8.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4/pdns_with_libssl.m4')
-rw-r--r-- | m4/pdns_with_libssl.m4 | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/m4/pdns_with_libssl.m4 b/m4/pdns_with_libssl.m4 new file mode 100644 index 0000000..28b32d5 --- /dev/null +++ b/m4/pdns_with_libssl.m4 @@ -0,0 +1,33 @@ +AC_DEFUN([PDNS_WITH_LIBSSL], [ + AC_MSG_CHECKING([whether we will be linking in OpenSSL libssl]) + HAVE_LIBSSL=0 + AC_ARG_WITH([libssl], + AS_HELP_STRING([--with-libssl],[use OpenSSL libssl @<:@default=auto@:>@]), + [with_libssl=$withval], + [with_libssl=auto], + ) + AC_MSG_RESULT([$with_libssl]) + + AS_IF([test "x$with_libssl" != "xno"], [ + AS_IF([test "x$with_libssl" = "xyes" -o "x$with_libssl" = "xauto"], [ + PKG_CHECK_MODULES([LIBSSL], [libssl], [ + [HAVE_LIBSSL=1] + AC_DEFINE([HAVE_LIBSSL], [1], [Define to 1 if you have OpenSSL libssl]) + save_CFLAGS=$CFLAGS + save_LIBS=$LIBS + CFLAGS="$LIBSSL_CFLAGS $CFLAGS" + LIBS="$LIBSSL_LIBS -lcrypto $LIBS" + AC_CHECK_FUNCS([SSL_CTX_set_ciphersuites OCSP_basic_sign SSL_CTX_set_num_tickets SSL_CTX_set_keylog_callback SSL_CTX_get0_privatekey SSL_CTX_set_min_proto_version SSL_set_hostflags SSL_CTX_set_alpn_protos SSL_CTX_set_next_proto_select_cb SSL_get0_alpn_selected SSL_get0_next_proto_negotiated SSL_CTX_set_alpn_select_cb SSL_CTX_use_cert_and_key]) + CFLAGS=$save_CFLAGS + LIBS=$save_LIBS + + ], [ : ]) + ]) + ]) + AM_CONDITIONAL([HAVE_LIBSSL], [test "x$LIBSSL_LIBS" != "x"]) + AS_IF([test "x$with_libssl" = "xyes"], [ + AS_IF([test x"$LIBSSL_LIBS" = "x"], [ + AC_MSG_ERROR([OpenSSL libssl requested but libraries were not found]) + ]) + ]) +]) |