Signed-off-by: Julian Ospald <[email protected]>
---
 configure.ac | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index e5503f1..a69e2dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -331,9 +331,20 @@ else
 fi
 AC_SUBST([argp_LDADD])
 
-dnl Check if we have <linux/bpf.h> for EM_BPF disassembly.
-AC_CHECK_HEADERS(linux/bpf.h)
-AM_CONDITIONAL(HAVE_LINUX_BPF_H, [test "x$ac_cv_header_linux_bpf_h" = "xyes"])
+dnl Check if we have <linux/bpf.h> for EM_BPF disassembly and it has the 
required defines
+AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+               [#include <linux/bpf.h>],
+               [int foo=BPF_PSEUDO_MAP_FD; return 0;]
+               )],
+       [have_bpf="true"],
+       [have_bpf="false"]
+)
+
+if test "$have_bpf" = "true" ; then
+       AC_DEFINE([HAVE_LINUX_BPF_H], [1], [if we have <linux/bpf.h> for EM_BPF 
disassembly])
+fi
+AM_CONDITIONAL(HAVE_LINUX_BPF_H, [test "$have_bpf" = "true"])
 
 dnl The directories with content.
 
-- 
2.9.3

Reply via email to