Skip to content

Commit

Permalink
Update meson.build
Browse files Browse the repository at this point in the history
  • Loading branch information
dgsga committed Mar 1, 2024
1 parent c844948 commit 11c5d06
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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 #
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 <pthread.h>
int main() {
int i = PTHREAD_PRIO_INHERIT;
return i;
}
''',
)
cdata.set('HAVE_PTHREAD_PRIO_INHERIT', 1)
endif

#
# OS-specific configuration
#
Expand Down

0 comments on commit 11c5d06

Please sign in to comment.