From: Bruce Richardson Date: Thu, 12 Nov 2020 09:41:40 +0000 (+0000) Subject: examples/l2fwd-keepalive: skip meson build if no librt X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b334236abd8dfeea625525de548b35b40cb68c3b;p=dpdk.git examples/l2fwd-keepalive: skip meson build if no librt When librt is not present on a system, processing the meson.build file for this example application causes an error. Make the library non-mandatory and just mark the example as unbuildable if it is not present. Fixes: 89f0711f9ddf ("examples: build some samples with meson") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- diff --git a/examples/l2fwd-keepalive/meson.build b/examples/l2fwd-keepalive/meson.build index d678a8ddd0..a56d679675 100644 --- a/examples/l2fwd-keepalive/meson.build +++ b/examples/l2fwd-keepalive/meson.build @@ -7,7 +7,13 @@ # DPDK instance, use 'make' allow_experimental_apis = true -ext_deps += cc.find_library('rt') +librt = cc.find_library('rt', required: false) +if not librt.found() + build = false + subdir_done() +endif + +ext_deps += librt deps += 'timer' sources = files( 'main.c', 'shm.c'