summaryrefslogtreecommitdiff
path: root/examples/timer
diff options
context:
space:
mode:
authorBruce Richardson <[email protected]>2019-11-15 15:16:59 +0000
committerThomas Monjalon <[email protected]>2019-11-20 22:47:15 +0100
commit12a652a02b080f26a1e9fd0169a58d6bcbe7b03c (patch)
tree2c254e81d71397fed6465d622fc788e2d48bfc59 /examples/timer
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 test-meson-builds.sh 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: [email protected] Reported-by: Ferruh Yigit <[email protected]> Signed-off-by: Bruce Richardson <[email protected]> Tested-by: Ferruh Yigit <[email protected]>
Diffstat (limited to 'examples/timer')
-rw-r--r--examples/timer/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/timer/Makefile b/examples/timer/Makefile
index a861783551..21f05918c5 100644
--- a/examples/timer/Makefile
+++ b/examples/timer/Makefile
@@ -17,7 +17,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)