From: Luca Boccassi Subject: [PATCH] net/mlx5: quietly fallback if pkg-config is unavailable Date: Fri, 9 Nov 2018 22:48:07 +0000 Message-ID: <20181109224807.5571-1-bluca@debian.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: yskoh@mellanox.com, shahafs@mellanox.com, thomas@monjalon.net, Luca Boccassi , stable@dpdk.org To: dev@dpdk.org Return-path: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Don't fail the build if pkg-config can't be found, instead print the linker flag as it was doing before the change. Fixes: b6b87939193a ("net/mlx5: use pkg-config to handle SUSE libmnl") Cc: stable@dpdk.org Signed-off-by: Luca Boccassi Reported-by: Thomas Monjalon --- drivers/net/mlx5/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index 7a50bccd2..895cdfeed 100644 --- a/drivers/net/mlx5/Makefile +++ b/drivers/net/mlx5/Makefile @@ -51,7 +51,7 @@ CFLAGS += -D_DEFAULT_SOURCE CFLAGS += -D_XOPEN_SOURCE=600 CFLAGS += $(WERROR_FLAGS) CFLAGS += -Wno-strict-prototypes -CFLAGS += $(shell pkg-config --cflags libmnl) +CFLAGS += $(shell command -v pkg-config > /dev/null 2>&1 && pkg-config --cflags libmnl) ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS),y) CFLAGS += -DMLX5_GLUE='"$(LIB_GLUE)"' CFLAGS += -DMLX5_GLUE_VERSION='"$(LIB_GLUE_VERSION)"' @@ -60,7 +60,7 @@ LDLIBS += -ldl else LDLIBS += -libverbs -lmlx5 endif -LDLIBS += $(shell pkg-config --libs libmnl) +LDLIBS += $(shell command -v pkg-config > /dev/null 2>&1 && pkg-config --libs libmnl || echo "-lmnl") LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs LDLIBS += -lrte_bus_pci -- 2.19.1