Skip to content
Snippets Groups Projects
Commit 6c398ff0 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

configure: fix libngtcp2 detection if disabled utilities, upgrade to v0.5.0

parent 3252779e
No related branches found
No related tags found
No related merge requests found
......@@ -554,6 +554,34 @@ AS_IF([test "$enable_daemon" = "yes" -o "$enable_utilities" = "yes"], [
libedit_LIBS=
])
# libngtcp2
AC_ARG_WITH(libngtcp2,
AS_HELP_STRING([--with-libngtcp2=[DIR|embedded]], [Support DoQ (needs libngtcp2 >= 0.5.0, gnutls >= 3.7.2)]),
[with_libngtcp2=$withval], [with_libngtcp2=yes]
)
AS_IF([test "$with_libngtcp2" != "no"], [
AS_IF([test "$with_libngtcp2" = "embedded"], [
AS_IF([test "$gnutls_quic" = "yes"],
[embedded_libngtcp2_CFLAGS="-I\$(top_srcdir)/src/contrib/libngtcp2 -I\$(top_srcdir)/src/contrib/libngtcp2/ngtcp2/lib"
embedded_libngtcp2_LIBS=$libelf_LIBS
libngtcp2_CFLAGS="-I\$(top_srcdir)/src/contrib/libngtcp2"],
[with_libngtcp2=no
AC_MSG_WARN([gnutls >= 3.7.2 is required])])], [
PKG_CHECK_MODULES([libngtcp2], [libngtcp2 >= 0.5.0 libngtcp2_crypto_gnutls],
[with_libngtcp2=libngtcp2],
[with_libngtcp2=no
AC_MSG_WARN([libngtcp2 >= 0.5.0 not found])])])
])
AM_CONDITIONAL([EMBEDDED_LIBNGTCP2], [test "$with_libngtcp2" = "embedded"])
AC_SUBST([embedded_libngtcp2_CFLAGS])
AC_SUBST([embedded_libngtcp2_LIBS])
AC_SUBST([libngtcp2_CFLAGS])
AC_SUBST([libngtcp2_LIBS])
AS_IF([test "$with_libngtcp2" != "no"], [
AC_DEFINE([LIBNGTCP2], [1], [Define to 1 to enable DoQ support using libngtcp2 and GnuTLS])])
############################################
# Dependencies needed for Knot DNS utilities
############################################
......@@ -572,13 +600,6 @@ AC_ARG_WITH(libnghttp2,
with_libnghttp2=yes
)
dnl Check for libngtcp2.
AC_ARG_WITH(libngtcp2,
AS_HELP_STRING([--with-libngtcp2=[DIR|embedded]], [Support DoQ (needs libngtcp2, gnutls >= 3.7.2)]),
with_libngtcp2=$withval,
with_libngtcp2=yes
)
AS_IF([test "$enable_utilities" = "yes"], [
AS_IF([test "$with_libidn" != "no"], [
PKG_CHECK_MODULES([libidn2], [libidn2 >= 2.0.0], [
......@@ -607,28 +628,6 @@ AS_IF([test "$enable_utilities" = "yes"], [
])
])
AS_IF([test "$with_libngtcp2" != "no"], [
AS_IF([test "$with_libngtcp2" = "embedded"], [
AS_IF([test "$gnutls_quic" = "yes"],
[embedded_libngtcp2_CFLAGS="-I\$(top_srcdir)/src/contrib/libngtcp2 -I\$(top_srcdir)/src/contrib/libngtcp2/ngtcp2/lib"
embedded_libngtcp2_LIBS=$libelf_LIBS
libngtcp2_CFLAGS="-I\$(top_srcdir)/src/contrib/libngtcp2"],
[with_libngtcp2=no
AC_MSG_ERROR([gnutls >= 3.7.2 is required])])], [
PKG_CHECK_MODULES([libngtcp2], [libngtcp2 libngtcp2_crypto_gnutls],
[with_libngtcp2=libngtcp2],
[with_libngtcp2=no
AC_MSG_WARN([libngtcp2 not found])])])
])
AM_CONDITIONAL([EMBEDDED_LIBNGTCP2], [test "$with_libngtcp2" = "embedded"])
AC_SUBST([embedded_libngtcp2_CFLAGS])
AC_SUBST([embedded_libngtcp2_LIBS])
AC_SUBST([libngtcp2_CFLAGS])
AC_SUBST([libngtcp2_LIBS])
AS_IF([test "$with_libngtcp2" != "no"], [
AC_DEFINE([LIBNGTCP2], [1], [Define to 1 to enable DoQ support based on GnuTLS])])
AS_IF([test "$enable_xdp" != "no"], [
PKG_CHECK_MODULES([libmnl], [libmnl], [], [
AC_MSG_ERROR([libmnl not found])
......@@ -812,13 +811,12 @@ result_msg_base=" Knot DNS $VERSION
Use recvmmsg: ${enable_recvmmsg}
Use SO_REUSEPORT(_LB): ${enable_reuseport}
XDP support: ${enable_xdp}
Ngtcp2 (DoQ): ${with_libngtcp2}
DoQ support: ${with_libngtcp2}
Socket polling: ${socket_polling}
Memory allocator: ${with_memory_allocator}
Fast zone parser: ${enable_fastparser}
Utilities with IDN: ${with_libidn}
Utilities with DoH: ${with_libnghttp2}
Utilities with DoQ: ${with_libngtcp2}
Utilities with Dnstap: ${enable_dnstap}
MaxMind DB support: ${enable_maxminddb}
Systemd integration: ${enable_systemd}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment