]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: Define HAVE_CLOCK_GETTIME
authorFred Morcos <fred.morcos@open-xchange.com>
Tue, 6 Feb 2024 15:00:43 +0000 (16:00 +0100)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:59 +0000 (13:28 +0100)
meson.build
meson/clock-gettime/meson.build

index ec3ac02694de3f6d7bb5ade7425c68b5db0ba682..7ac24aa564d2ab5e657ba5b190ce05ab3e90150e 100644 (file)
@@ -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,
index 673817f5f8db9f9853a9b4a618aef24b594ddbff..b1249a0e22b781e7108e109e78d97e417a9b9ee7 100644 (file)
@@ -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()