configure: require libmnl
Subsystems (3)
PATCH 1/1 configure: require libmnl
Several users of BPF and other features are trying to build without libmnl, then complaining that features don't work. The time has come to require libmnl to build iproute2.
Signed-off-by Stephen Hemminger <[email protected]>
--- configure | 20 +++++++++++--------- lib/libnetlink.c | 10 ---------- 2 files changed, 11 insertions(+), 19 deletions(-)
configure +11 -9
@@ -281,16 +281,18 @@ check_selinux() check_mnl() { - if ${PKG_CONFIG} libmnl --exists - then - echo "HAVE_MNL:=y" >>$CONFIG - echo "yes" + if ${PKG_CONFIG} libmnl --exists + then + echo "HAVE_MNL:=y" >>$CONFIG + echo "yes" - echo 'CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >>$CONFIG - echo 'LDLIBS +=' `${PKG_CONFIG} libmnl --libs` >> $CONFIG - else - echo "no" - fi + echo 'CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >>$CONFIG + echo 'LDLIBS +=' `${PKG_CONFIG} libmnl --libs` >> $CONFIG + else + echo "no" + echo "libmnl is required. please install libmnl-dev or libmnl-devel" 1>&2 + exit 1 + fi } check_berkeley_db()
lib/libnetlink.c +0 -10
@@ -35,7 +35,6 @@int rcvbuf =1024 *1024 ; -#ifdef HAVE_LIBMNL #include <libmnl/libmnl.h> static const enum mnl_attr_data_type extack_policy[NLMSGERR_ATTR_MAX +1 ] = {
@@ -116,15 +115,6 @@ int nl_dump_ext_ack(const struct nlmsghdr *nlh, nl_ext_ack_fn_t errfn)return 0 ; } -#else -#warning "libmnl required for error support" - -/* No extended error ack without libmnl */ -int nl_dump_ext_ack (const struct nlmsghdr *nlh,nl_ext_ack_fn_t errfn) -{ -return 0 ; -} -#endif void rtnl_close (struct rtnl_handle *rth) {
Signature · 1 line
2.17.0
Quoted 5 lines · Stephen Hemminger
Several users of BPF and other features are trying to build without libmnl, then complaining that features don't work. The time has come to require libmnl to build iproute2.
Signed-off-by Stephen Hemminger <[email protected]>
Reviewed-by Simon Horman <[email protected]>