From: Remi Gacogne Date: Mon, 15 Jan 2024 16:01:26 +0000 (+0100) Subject: dnsdist: Fix XSK/AF_XDP detection X-Git-Tag: dnsdist-1.9.0-rc1^2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd1e67ab639ceb0aaceac2c5e9af2d1d2cfff02d;p=thirdparty%2Fpdns.git dnsdist: Fix XSK/AF_XDP detection --- diff --git a/pdns/dnsdistdist/configure.ac b/pdns/dnsdistdist/configure.ac index d9f6c719dd..81e39c8bc9 100644 --- a/pdns/dnsdistdist/configure.ac +++ b/pdns/dnsdistdist/configure.ac @@ -219,6 +219,10 @@ AS_IF([test "x$systemd" != "xn"], [AC_MSG_NOTICE([systemd: yes])], [AC_MSG_NOTICE([systemd: no])] ) +AS_IF([test x"$BPF_LIBS" != "x" -a x"$XDP_LIBS" != "x"], + [AC_MSG_NOTICE([AF_XDP/XSK: yes])], + [AC_MSG_NOTICE([AF_XDP/XSK: no])] +) AS_IF([test "x$HAVE_IPCIPHER" = "x1"], [AC_MSG_NOTICE([ipcipher: yes])], [AC_MSG_NOTICE([ipcipher: no])] diff --git a/pdns/dnsdistdist/m4/pdns_with_xsk.m4 b/pdns/dnsdistdist/m4/pdns_with_xsk.m4 index 655d410f80..32cee27077 100644 --- a/pdns/dnsdistdist/m4/pdns_with_xsk.m4 +++ b/pdns/dnsdistdist/m4/pdns_with_xsk.m4 @@ -17,8 +17,12 @@ AC_DEFUN([PDNS_WITH_XSK],[ ], [:]) ]) ]) - AC_DEFINE([HAVE_XSK], [test x"$BPF_LIBS" != "x" -a x"$XDP_LIBS" != "x"], [Define to 1 if you have AF_XDP (XSK) support enabled]) + AM_CONDITIONAL([HAVE_XSK], [test x"$BPF_LIBS" != "x" -a x"$XDP_LIBS" != "x"]) + AM_COND_IF([HAVE_XSK], [ + AC_DEFINE([HAVE_XSK], [1], [Define to 1 if you have AF_XDP (XSK) support enabled]) + ]) + AS_IF([test "x$with_xsk" = "xyes"], [ AS_IF([test x"$BPF_LIBS" = "x" -o x"$XDP_LIBS" = "x" ], [ AC_MSG_ERROR([AF_XDP (XSK) support requested but required libbpf and/or libxdp were not found])