iproute2: support eBFP/XDP object file loading, simplify linking libelf
[openwrt/openwrt.git] / package / network / utils / iproute2 / patches / 145-keep_libelf_optional.patch
diff --git a/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch b/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch
new file mode 100644 (file)
index 0000000..2e3ad18
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/configure
++++ b/configure
+@@ -228,7 +228,7 @@ EOF
+ check_elf()
+ {
+-    if ${PKG_CONFIG} libelf --exists; then
++    if [ "${HAVE_ELF}" = "y" ] && ${PKG_CONFIG} libelf --exists; then
+       echo "HAVE_ELF:=y" >>$CONFIG
+       echo "yes"