]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: Auth various functions
authorFred Morcos <fred.morcos@open-xchange.com>
Thu, 6 Jul 2023 12:09:25 +0000 (14:09 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:28 +0000 (13:28 +0100)
meson.build

index ead054a8de1761f04ab361e44787d0b0d4a2d318..3fe2f024afa13fe33570d6836f520b35e6fcbfd7 100644 (file)
@@ -91,6 +91,23 @@ if not fs.exists('docs/pdns_server.1') and not python_have_venv
 endif
 # TODO Generate pdns_server.1 manpage
 
+# Various Functions
+funcs = [
+  'strcasestr',
+  'localtime_r',
+  'gmtime_r',
+  'recvmmsg',
+  'sched_setscheduler',
+  'getrandom',
+  'arc4random',
+]
+foreach func: funcs
+  found = cxx.has_function(func)
+  define = 'HAVE_' + func.to_upper()
+  conf.set10(define, found, description: 'Whether we have ' + func)
+  # summary(func, found, bool_yn: true, section: 'Various Functions')
+endforeach
+
 # Generate config.h ----------------------------------------------------------------------
 config_h = configure_file(configuration: conf, output: 'config.h')
 # summary('Defines', conf.keys(), section: 'Build Configuration') # TODO Meson 0.57