From 11c5d0600db01f5b1161a27c3278accb9cdf1004 Mon Sep 17 00:00:00 2001 From: dgsga <181612+dgsga@users.noreply.github.com> Date: Fri, 1 Mar 2024 15:48:35 +0000 Subject: [PATCH] Update meson.build --- meson.build | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 7f7d18a65a..c362b0a0fb 100644 --- a/meson.build +++ b/meson.build @@ -136,11 +136,10 @@ add_global_link_arguments(netatalk_common_link_args, language: 'c') ################ # dl = dependency('dl', required : false) -gio = dependency('gio-2.0', required: true) +#gio = dependency('gio-2.0', required: true) glib = dependency('glib-2.0', required: true) -gthread = dependency('gthread-2.0', required: true) +#gthread = dependency('gthread-2.0', required: true) talloc = dependency('talloc', required: false) -threads = dependency('threads', required: true) ############ # Programs # @@ -365,7 +364,7 @@ if get_option('with-bdb') == '' if fs.exists('/usr/pkg/include' / dir / 'db.h') bdb_header += '/usr/pkg/include' / dir / 'db.h' bdb_libdir += '/usr/pkg/lib' - bdb_includes += include_directories('/usr/pkg/include' / dir) + bdb_includes += include_directories('/usr/pkg/include' / dir) endif endforeach endif @@ -1490,6 +1489,29 @@ if get_option('with-dtrace') and not dtrace.found() message('Dtrace requested but not found') endif +# +# Check for POSIX threads +# + +threads = dependency('threads', required: true) +if threads.found() + cdata.set('HAVE_PTHREAD', 1) +endif + +# Check for PTHREAD_PRIO_INHERIT + +if cc.compiles( + ''' +#include +int main() { +int i = PTHREAD_PRIO_INHERIT; + return i; +} +''', +) + cdata.set('HAVE_PTHREAD_PRIO_INHERIT', 1) +endif + # # OS-specific configuration #