[v3,06/11] examples/l3fwd-graph: fix pkg-config usage

Message ID 20201114090533.6059-7-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series Examples compilation fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

David Marchand Nov. 14, 2020, 9:05 a.m. UTC
  This example missed the fixes from commit 69b1bb49ed82
("examples: hide error for missing pkg-config path flag") and
commit 12a652a02b08 ("examples: fix build with old pkg-config").

Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 examples/l3fwd-graph/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/examples/l3fwd-graph/Makefile b/examples/l3fwd-graph/Makefile
index 1e4f0600ae..6e3d0bca06 100644
--- a/examples/l3fwd-graph/Makefile
+++ b/examples/l3fwd-graph/Makefile
@@ -19,9 +19,9 @@  shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
-PC_FILE := $(shell $(PKGCONF) --path libdpdk)
+PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) -DALLOW_EXPERIMENTAL_API
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)