examples: fix build with old pkg-config
[dpdk.git] / examples / l2fwd-keepalive / Makefile
index 9b92bc2..68e4674 100644 (file)
@@ -8,8 +8,7 @@ APP = l2fwd-keepalive
 SRCS-y := main.c shm.c
 
 # Build using pkg-config variables if possible
-$(shell pkg-config --exists libdpdk)
-ifeq ($(.SHELLSTATUS),0)
+ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)
 
 all: shared
 .PHONY: shared static
@@ -20,7 +19,7 @@ static: build/$(APP)-static
 
 LDFLAGS += -pthread -lrt
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)