numam-dpdk/examples/l2fwd-event
Bruce Richardson 12a652a02b 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: ca9268529d ("examples: support relocated DPDK install")
Fixes: 7f80a2102b ("devtools: test pkg-config file")
Cc: stable@dpdk.org

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-11-20 22:47:15 +01:00
..
l2fwd_common.c examples/l2fwd-event: add eventdev main loop 2019-11-04 18:09:30 +01:00
l2fwd_common.h examples/l2fwd-event: add eventdev main loop 2019-11-04 18:09:30 +01:00
l2fwd_event_generic.c examples/l2fwd-event: fix build on RHEL 7.6 2019-11-08 16:40:29 +01:00
l2fwd_event_internal_port.c examples/l2fwd-event: fix build on RHEL 7.6 2019-11-08 16:40:29 +01:00
l2fwd_event.c examples/l2fwd-event: add eventdev main loop 2019-11-04 18:09:30 +01:00
l2fwd_event.h examples/l2fwd-event: add eventdev main loop 2019-11-04 18:09:30 +01:00
l2fwd_poll.c examples/l2fwd-event: add default poll mode routines 2019-11-04 18:07:43 +01:00
l2fwd_poll.h examples/l2fwd-event: add default poll mode routines 2019-11-04 18:07:43 +01:00
main.c examples/l2fwd-event: add graceful teardown 2019-11-04 18:09:33 +01:00
Makefile examples: fix build with old pkg-config 2019-11-20 22:47:15 +01:00
meson.build examples/l2fwd-event: add eventdev main loop 2019-11-04 18:09:30 +01:00