mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
configure: Check for libmnl
The nat64-bpf example uses libmnl, so add a check for it in configure, and bail if it's not available. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
This commit is contained in:
16
configure
vendored
16
configure
vendored
@@ -73,6 +73,20 @@ check_zlib()
|
||||
fi
|
||||
}
|
||||
|
||||
check_libmnl()
|
||||
{
|
||||
if ${PKG_CONFIG} libmnl --exists; then
|
||||
echo "HAVE_LIBMNL:=y" >>$CONFIG
|
||||
echo "yes"
|
||||
|
||||
echo 'CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >> $CONFIG
|
||||
echo 'LDLIBS += ' `${PKG_CONFIG} libmnl --libs` >>$CONFIG
|
||||
else
|
||||
echo "missing - this is required"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
check_libbpf()
|
||||
{
|
||||
local libbpf_err
|
||||
@@ -250,6 +264,8 @@ quiet_config >> $CONFIG
|
||||
|
||||
check_toolchain
|
||||
|
||||
echo -n "libmnl support: "
|
||||
check_libmnl
|
||||
echo -n "libbpf support: "
|
||||
check_libbpf
|
||||
echo -n "libxdp support: "
|
||||
|
Reference in New Issue
Block a user