From: Fred Morcos Date: Tue, 6 Feb 2024 15:00:43 +0000 (+0100) Subject: Meson: Define HAVE_CLOCK_GETTIME X-Git-Tag: rec-5.1.0-alpha1~80^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ab6b5839d02325bc795157c4a8aef613397d7d8;p=thirdparty%2Fpdns.git Meson: Define HAVE_CLOCK_GETTIME --- diff --git a/meson.build b/meson.build index ec3ac02694..7ac24aa564 100644 --- a/meson.build +++ b/meson.build @@ -276,6 +276,7 @@ libpdns_gettime = static_library( 'pdns-gettime', src_dir / 'gettime.cc', src_dir / 'gettime.hh', + dependencies: dep_rt, ) common_sources += files( @@ -462,7 +463,6 @@ deps = [ dep_libcrypto, dep_libssl, dep_gnutls, - dep_rt, dep_boost, dep_boost_program_options, dep_dlopen, diff --git a/meson/clock-gettime/meson.build b/meson/clock-gettime/meson.build index 673817f5f8..b1249a0e22 100644 --- a/meson/clock-gettime/meson.build +++ b/meson/clock-gettime/meson.build @@ -3,12 +3,10 @@ dep_rt = dependency('', required: false) if not found dep_rt = cxx.find_library('rt', required: true) - - if not cxx.has_function('clock_gettime', dependencies: dep_rt) - error('Cannot find function `clock_gettime`') - endif + found = cxx.has_function('clock_gettime', dependencies: dep_rt) endif +conf.set('HAVE_CLOCK_GETTIME', found, description: 'Have clock_gettime') summary('clock_gettime', true, bool_yn: true, section: 'System') if dep_rt.found()