summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomáš Kopal <Tomas.Kopal@altap.cz>2020-10-20 17:44:39 +0200
committerGitHub <noreply@github.com>2020-10-20 11:44:39 -0400
commit4ed573ca506bd7f59c74eba72aaeb3047a7b9a72 (patch)
treece5c4ecb43d52bbfd07583f2e6970e920faf3e09
parent7cfcd85d9f6dd1a319a2510aaf3e9af0989eb3a4 (diff)
Don't check for ebpf dependencies if ebpf is disabled. (#10034)
-rw-r--r--configure.ac56
1 files changed, 29 insertions, 27 deletions
diff --git a/configure.ac b/configure.ac
index 57f6c0b1cb..5f13b4feb0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -989,36 +989,38 @@ AM_CONDITIONAL([ENABLE_PLUGIN_PERF], [test "${enable_plugin_perf}" = "yes"])
# -----------------------------------------------------------------------------
# ebpf.plugin
-PKG_CHECK_MODULES(
- [LIBELF],
- [libelf],
- [have_libelf=yes],
- [have_libelf=no]
-)
+if test "${build_target}" = "linux" -a "${enable_ebpf}" != "no"; then
+ PKG_CHECK_MODULES(
+ [LIBELF],
+ [libelf],
+ [have_libelf=yes],
+ [have_libelf=no]
+ )
-AC_CHECK_TYPE(
- [struct bpf_prog_info],
- [have_bpf=yes],
- [have_bpf=no],
- [#include <linux/bpf.h>]
-)
+ AC_CHECK_TYPE(
+ [struct bpf_prog_info],
+ [have_bpf=yes],
+ [have_bpf=no],
+ [#include <linux/bpf.h>]
+ )
-AC_CHECK_FILE(
- externaldeps/libbpf/libbpf.a,
- [have_libbpf=yes],
- [have_libbpf=no]
-)
+ AC_CHECK_FILE(
+ externaldeps/libbpf/libbpf.a,
+ [have_libbpf=yes],
+ [have_libbpf=no]
+ )
-AC_MSG_CHECKING([if ebpf.plugin should be enabled])
-if test "${build_target}" = "linux" -a \
- "${enable_ebpf}" != "no" -a \
- "${have_libelf}" = "yes" -a \
- "${have_bpf}" = "yes" -a \
- "${have_libbpf}" = "yes"; then
- OPTIONAL_BPF_CFLAGS="${LIBELF_CFLAGS} -I externaldeps/libbpf/include"
- OPTIONAL_BPF_LIBS="externaldeps/libbpf/libbpf.a ${LIBELF_LIBS}"
- AC_DEFINE([HAVE_LIBBPF], [1], [libbpf usability])
- enable_ebpf="yes"
+ AC_MSG_CHECKING([if ebpf.plugin should be enabled])
+ if test "${have_libelf}" = "yes" -a \
+ "${have_bpf}" = "yes" -a \
+ "${have_libbpf}" = "yes"; then
+ OPTIONAL_BPF_CFLAGS="${LIBELF_CFLAGS} -I externaldeps/libbpf/include"
+ OPTIONAL_BPF_LIBS="externaldeps/libbpf/libbpf.a ${LIBELF_LIBS}"
+ AC_DEFINE([HAVE_LIBBPF], [1], [libbpf usability])
+ enable_ebpf="yes"
+ else
+ enable_ebpf="no"
+ fi
else
enable_ebpf="no"
fi