]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix XSK/AF_XDP detection
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 15 Jan 2024 16:01:26 +0000 (17:01 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 23 Jan 2024 11:54:25 +0000 (12:54 +0100)
pdns/dnsdistdist/configure.ac
pdns/dnsdistdist/m4/pdns_with_xsk.m4

index d9f6c719ddc392b33d5567a051cab371d8d3c7e7..81e39c8bc983e366fc8ecd402c565d2624b2642b 100644 (file)
@@ -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])]
index 655d410f808f9acd88d1053da4edaea5f15b0d51..32cee27077657c039180334f24e1f7babbb68265 100644 (file)
@@ -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])