realtime_libs = []
have = cc.has_function('clock_gettime')
if not have
- realtime_libs += cc.find_library('rt', required : true)
- have = cc.has_function('clock_gettime',
- dependencies : realtime_libs)
+ lib_rt = cc.find_library('rt', required : false)
+ if lib_rt.found()
+ realtime_libs += lib_rt
+ have = cc.has_function('clock_gettime',
+ dependencies : realtime_libs)
+ endif
endif
conf.set('HAVE_CLOCK_GETTIME', have ? 1 : false)
have = cc.has_function('timer_create')
if not have
- realtime_libs = [cc.find_library('rt', required : true)]
- have = cc.has_function('timer_create',
- dependencies : realtime_libs)
+ lib_rt = cc.find_library('rt', required : false)
+ if lib_rt.found()
+ realtime_libs = [lib_rt]
+ have = cc.has_function('timer_create',
+ dependencies : realtime_libs)
+ endif
if not have
realtime_libs += thread_libs
have = cc.has_function('timer_create',
command : ['tools/all_errnos', cc.cmd_array(), get_option('c_args')],
)
-mq_libs = []
-mq_libs += cc.find_library('rt', required : true)
+lib_rt = cc.find_library('rt', required : get_option('build-lsfd'))
+opt = not get_option('build-lsfd').disabled()
exe = executable(
'lsfd',
lsfd_sources, errnos_h,
include_directories : includes,
link_with : [lib_common,
lib_smartcols],
- dependencies : mq_libs,
+ dependencies : [lib_rt],
install_dir : usrbin_exec_dir,
- install : true)
-if not is_disabler(exe)
+ install : opt,
+ build_by_default : opt)
+if opt and not is_disabler(exe)
exes += exe
manadocs += ['misc-utils/lsfd.1.adoc']
endif
build_by_default: program_tests)
exes += exe
-if LINUX
+if LINUX and lib_rt.found()
exe = executable(
'test_mkfds',
'tests/helpers/test_mkfds.c',
'tests/helpers/test_mkfds.h',
'tests/helpers/test_mkfds_ppoll.c',
include_directories : includes,
- dependencies : mq_libs,
+ dependencies : [lib_rt],
build_by_default: program_tests)
exes += exe
endif
description : 'build cal')
option('build-logger', type : 'feature',
description : 'build logger')
+option('build-lsfd', type : 'feature',
+ description : 'build lsfd')
option('build-switch_root', type : 'feature',
description : 'switch_root')
option('build-pivot_root', type : 'feature',