path: root/examples/fips_validation
diff options
authorBruce Richardson <>2019-11-15 15:16:59 +0000
committerThomas Monjalon <>2019-11-20 22:47:15 +0100
commit12a652a02b080f26a1e9fd0169a58d6bcbe7b03c (patch)
tree2c254e81d71397fed6465d622fc788e2d48bfc59 /examples/fips_validation
parente7f4fbb30153702438e7b776eb05966caefc2c77 (diff)
examples: fix build with old pkg-config
Not all versions of pkg-config in distros have support for the --define-prefix flag [1], causing errors when building examples manually or with script [2]. For the former case, we need to remove the hard-coded use of the flag in the Makefiles. For the latter case, the flag is necessary for builds to succeed, so we skip the tests when it's not present, passing it as part of the pkg-config command if it is supported. [1] CentOS Linux release 7.7.1908 (Core) pkg-config version 0.27.1 [2] ## Building cmdline Unknown option --define-prefix gmake: Entering directory `...ild-x86-default/install-root/usr/local/share/dpdk/examples/cmdline' rm -f build/cmdline build/cmdline-static build/cmdline-shared test -d build && rmdir -p build || true Unknown option --define-prefix Unknown option --define-prefix gcc -O3 main.c commands.c parse_obj_list.c -o build/cmdline-shared main.c:14:28: fatal error: cmdline_rdline.h: No such file or directory Fixes: ca9268529d2b ("examples: support relocated DPDK install") Fixes: 7f80a2102bbb ("devtools: test pkg-config file") Cc: Reported-by: Ferruh Yigit <> Signed-off-by: Bruce Richardson <> Tested-by: Ferruh Yigit <>
Diffstat (limited to 'examples/fips_validation')
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile
index 9485daf..da5c8f6 100644
--- a/examples/fips_validation/Makefile
+++ b/examples/fips_validation/Makefile
@@ -26,7 +26,7 @@ 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)
CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)