From 4fc2f55f761d71aae1f145d5aa94ba929cc39676 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 11:34:30 +0200 Subject: Adding upstream version 1.7.3. Signed-off-by: Daniel Baumann --- m4/pdns_with_libssl.m4 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 m4/pdns_with_libssl.m4 (limited to 'm4/pdns_with_libssl.m4') diff --git a/m4/pdns_with_libssl.m4 b/m4/pdns_with_libssl.m4 new file mode 100644 index 0000000..3e32bc4 --- /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]) + 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]) + ]) + ]) +]) -- cgit v1.2.3