diff options
author | Jordan Williams <jordan@jwillikers.com> | 2024-04-01 12:18:52 -0500 |
---|---|---|
committer | Jordan Williams <jordan@jwillikers.com> | 2024-04-01 12:18:52 -0500 |
commit | 243950279f413e3844d13a2d87b3853c1242f437 (patch) | |
tree | 337a7da621b9744772b7634c56ba7b3f1675993b | |
parent | 06b27058a04c1ac9eba44f19e320ecd862f6d75f (diff) | |
download | util-linux-243950279f413e3844d13a2d87b3853c1242f437.tar.gz |
meson: Only pick up the rt library once
Require the rt library for the build-lsfd feature.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
-rw-r--r-- | meson.build | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/meson.build b/meson.build index 9ead241ef9..789407e15b 100644 --- a/meson.build +++ b/meson.build @@ -728,10 +728,10 @@ if not cc.has_function('socket') endif endif +lib_rt = cc.find_library('rt', required : false) realtime_libs = [] have = cc.has_function('clock_gettime') if not have - lib_rt = cc.find_library('rt', required : false) if lib_rt.found() realtime_libs += lib_rt have = cc.has_function('clock_gettime', @@ -744,7 +744,6 @@ thread_libs = dependency('threads') have = cc.has_function('timer_create') if not have - lib_rt = cc.find_library('rt', required : false) if lib_rt.found() realtime_libs = [lib_rt] have = cc.has_function('timer_create', @@ -2717,9 +2716,7 @@ errnos_h = custom_target('errnos.h', command : ['tools/all_errnos', cc.cmd_array(), get_option('c_args')], ) -lib_rt = cc.find_library('rt', required : get_option('build-lsfd')) - -opt = not get_option('build-lsfd').disabled() +opt = not get_option('build-lsfd').require(lib_rt.found()).disabled() exe = executable( 'lsfd', lsfd_sources, errnos_h, |