diff -ru iproute2-6.6.0.orig/configure iproute2-6.6.0/configure
--- iproute2-6.6.0.orig/configure	2024-10-04 17:04:41.029306575 +0200
+++ iproute2-6.6.0/configure	2024-10-04 17:05:08.912921678 +0200
@@ -49,7 +49,7 @@
 
 check_xtables()
 {
-	if ! ${PKG_CONFIG} xtables --exists; then
+	if [ "$XTABLES_FORCE" = off ] || ! ${PKG_CONFIG} xtables --exists; then
 		echo "TC_CONFIG_NO_XT:=y" >>$CONFIG
 	fi
 }
@@ -267,6 +267,11 @@
 
 check_elf()
 {
+    if [ "$LIBELF_FORCE" = off ]; then
+	echo "no"
+	return
+    fi
+
     if ${PKG_CONFIG} libelf --exists; then
 	echo "HAVE_ELF:=y" >>$CONFIG
 	echo "yes"
@@ -386,6 +391,11 @@
 check_selinux()
 # SELinux is a compile time option in the ss utility
 {
+	if [ "$LIBSELINUX_FORCE" = off ]; then
+		echo "no"
+		return
+	fi
+
 	if ${PKG_CONFIG} libselinux --exists; then
 		echo "HAVE_SELINUX:=y" >>$CONFIG
 		echo "yes"
@@ -399,6 +409,11 @@
 
 check_tirpc()
 {
+	if [ "$LIBTIRPC_FORCE" = off ]; then
+		echo "no"
+		return
+	fi
+
 	if ${PKG_CONFIG} libtirpc --exists; then
 		echo "HAVE_RPC:=y" >>$CONFIG
 		echo "yes"
@@ -412,6 +427,11 @@
 
 check_mnl()
 {
+	if [ "$LIBMNL_FORCE" = off ]; then
+		echo "no"
+		return
+	fi
+
 	if ${PKG_CONFIG} libmnl --exists; then
 		echo "HAVE_MNL:=y" >>$CONFIG
 		echo "yes"
@@ -425,6 +445,11 @@
 
 check_berkeley_db()
 {
+    if [ "$LIBBERKELEYDB_FORCE" = off ]; then
+        echo "no"
+        return
+    fi
+
     cat >$TMPDIR/dbtest.c <<EOF
 #include <fcntl.h>
 #include <stdlib.h>
@@ -470,6 +495,11 @@
 
 check_cap()
 {
+	if [ "$LIBCAP_FORCE" = off ]; then
+		echo "no"
+		return
+	fi
+
 	if ${PKG_CONFIG} libcap --exists; then
 		echo "HAVE_CAP:=y" >>$CONFIG
 		echo "yes"
