]> git.ipfire.org Git - thirdparty/pdns.git/blob - pdns/dnsdistdist/m4/dnsdist_with_libssl.m4
configure: with-libsodium
[thirdparty/pdns.git] / pdns / dnsdistdist / m4 / dnsdist_with_libssl.m4
1 AC_DEFUN([DNSDIST_WITH_LIBSSL], [
2 AC_MSG_CHECKING([whether we will be linking in OpenSSL libssl])
3 HAVE_LIBSSL=0
4 AC_ARG_WITH([libssl],
5 AS_HELP_STRING([--with-libssl],[use OpenSSL libssl @<:@default=auto@:>@]),
6 [with_libssl=$withval],
7 [with_libssl=auto],
8 )
9 AC_MSG_RESULT([$with_libssl])
10
11 AS_IF([test "x$with_libssl" != "xno"], [
12 AS_IF([test "x$with_libssl" = "xyes" -o "x$with_libssl" = "xauto"], [
13 PKG_CHECK_MODULES([LIBSSL], [libssl], [
14 [HAVE_LIBSSL=1]
15 AC_DEFINE([HAVE_LIBSSL], [1], [Define to 1 if you have OpenSSL libssl])
16 ], [ : ])
17 ])
18 ])
19 AM_CONDITIONAL([HAVE_LIBSSL], [test "x$LIBSSL_LIBS" != "x"])
20 AS_IF([test "x$with_libssl" = "xyes"], [
21 AS_IF([test x"$LIBSSL_LIBS" = "x"], [
22 AC_MSG_ERROR([OpenSSL libssl requested but libraries were not found])
23 ])
24 ])
25 ])